pub trait CurrentLedgerObjectCommonFields {
// Provided methods
fn path(&self) -> LedgerPathBuilder { ... }
fn get_flags(&self) -> Result<u32> { ... }
fn get_ledger_entry_type(&self) -> Result<u16> { ... }
}Expand description
Trait providing access to common fields in the current ledger object.
This trait defines methods to access standard fields that are common across different types of ledger objects, specifically for the current ledger object being processed.
Provided Methods§
Sourcefn path(&self) -> LedgerPathBuilder
fn path(&self) -> LedgerPathBuilder
Starts a nested-field path rooted at the current ledger object (no slot).
Use this to reach into arrays and inner objects that the flat getters below can’t return
whole. Chain field / index, then
get::<T>().
use xrpl_common_stdlib::objects::traits::CurrentLedgerObjectCommonFields;
use xrpl_common_stdlib::sfield;
use xrpl_common_stdlib::types::amount::Amount;
let amount = obj.path().field(sfield::Amount).get::<Amount>();Sourcefn get_ledger_entry_type(&self) -> Result<u16>
fn get_ledger_entry_type(&self) -> Result<u16>
Retrieves the ledger entry type of the current ledger object.
The value 0x0075, mapped to the string Escrow, indicates that this is an Escrow entry.
§Returns
The ledger entry type as a u16 value
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".