get_field

Function get_field 

Source
pub fn get_field<T: FieldGetter>(
    register_num: i32,
    field_code: i32,
) -> Result<T>
Expand description

Retrieves a field from a specified ledger object.

§Arguments

  • register_num - The register number holding the ledger object to look for data in
  • field_code - The field code identifying which field to retrieve

§Returns

Returns a Result<T> where:

  • Ok(T) - The field value for the specified field
  • Err(Error) - If the field cannot be retrieved or has unexpected size