pub struct LedgerObject {
pub slot_num: i32,
}Expand description
A ledger object identified only by the slot it was cached into.
use xrpl_common_stdlib::objects::LedgerObject;
use xrpl_common_stdlib::objects::traits::LedgerObjectCommonFields;
use xrpl_common_stdlib::sfield;
// Read PriceDataSeries[0].AssetPrice off an Oracle object, which has no typed wrapper.
let price = LedgerObject::new(slot)
.path()
.field(sfield::PriceDataSeries)
.index(0)
.field(sfield::AssetPrice)
.get::<u64>();Fields§
§slot_num: i32Implementations§
Source§impl LedgerObject
impl LedgerObject
Trait Implementations§
Source§impl Clone for LedgerObject
impl Clone for LedgerObject
Source§fn clone(&self) -> LedgerObject
fn clone(&self) -> LedgerObject
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LedgerObject
Source§impl Debug for LedgerObject
impl Debug for LedgerObject
impl Eq for LedgerObject
Source§impl LedgerObjectCommonFields for LedgerObject
impl LedgerObjectCommonFields for LedgerObject
Source§fn get_slot_num(&self) -> i32
fn get_slot_num(&self) -> i32
Returns the slot number (register number) where the ledger object is stored. Read more
Source§fn path(&self) -> LedgerPathBuilder
fn path(&self) -> LedgerPathBuilder
Starts a nested-field path rooted at this ledger object, read through its slot. Read more
Source§impl PartialEq for LedgerObject
impl PartialEq for LedgerObject
impl StructuralPartialEq for LedgerObject
Auto Trait Implementations§
impl Freeze for LedgerObject
impl RefUnwindSafe for LedgerObject
impl Send for LedgerObject
impl Sync for LedgerObject
impl Unpin for LedgerObject
impl UnsafeUnpin for LedgerObject
impl UnwindSafe for LedgerObject
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more