get_field_optional

Function get_field_optional 

Source
pub fn get_field_optional<T: CurrentTxFieldGetter>(
    field_code: i32,
) -> Result<Option<T>>
Expand description

Retrieves an optionally present field from the current transaction.

§Arguments

  • field_code - The field code identifying which field to retrieve

§Returns

Returns a Result<Option<T>> where:

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