LedgerObjectCommonFields

Trait LedgerObjectCommonFields 

Source
pub trait LedgerObjectCommonFields {
    // Required method
    fn get_slot_num(&self) -> i32;

    // Provided methods
    fn get_ledger_index(&self) -> Result<Hash256> { ... }
    fn get_flags(&self) -> Result<u32> { ... }
    fn get_ledger_entry_type(&self) -> Result<u16> { ... }
}
Expand description

Trait providing access to common fields present in all ledger objects.

This trait defines methods to access standard fields that are common across different types of ledger objects in the XRP Ledger.

Required Methods§

Source

fn get_slot_num(&self) -> i32

Returns the slot number (register number) where the ledger object is stored.

This number is used to identify and access the specific ledger object when retrieving or modifying its fields.

§Returns

The slot number as an i32 value

Provided Methods§

Source

fn get_ledger_index(&self) -> Result<Hash256>

Retrieves the ledger index (unique identifier) of the ledger object.

§Arguments
  • register_num - The register number where the ledger object is stored
§Returns

The ledger index as a Hash256 value

Source

fn get_flags(&self) -> Result<u32>

Retrieves the flags field of the ledger object.

§Arguments
  • register_num - The register number where the ledger object is stored
§Returns

The flags as a u32 value

Source

fn get_ledger_entry_type(&self) -> Result<u16>

Retrieves the ledger entry type of the 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

Implementors§