pub struct LedgerIndex(pub MilestoneIndex);Expand description
A wrapper type to represent the current ledger index.
Tuple Fields§
§0: MilestoneIndexImplementations§
Source§impl LedgerIndex
impl LedgerIndex
Sourcepub fn new(index: MilestoneIndex) -> Self
pub fn new(index: MilestoneIndex) -> Self
Creates a new LedgerIndex.
Trait Implementations§
Source§impl Clone for LedgerIndex
impl Clone for LedgerIndex
Source§fn clone(&self) -> LedgerIndex
fn clone(&self) -> LedgerIndex
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LedgerIndex
impl Debug for LedgerIndex
Source§impl Default for LedgerIndex
impl Default for LedgerIndex
Source§fn default() -> LedgerIndex
fn default() -> LedgerIndex
Returns the “default value” for a type. Read more
Source§impl Deref for LedgerIndex
impl Deref for LedgerIndex
Source§impl From<MilestoneIndex> for LedgerIndex
impl From<MilestoneIndex> for LedgerIndex
Source§fn from(index: MilestoneIndex) -> Self
fn from(index: MilestoneIndex) -> Self
Converts to this type from the input type.
Source§impl Hash for LedgerIndex
impl Hash for LedgerIndex
Source§impl Ord for LedgerIndex
impl Ord for LedgerIndex
Source§fn cmp(&self, other: &LedgerIndex) -> Ordering
fn cmp(&self, other: &LedgerIndex) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl Packable for LedgerIndex
impl Packable for LedgerIndex
Source§fn packed_len(&self) -> usize
fn packed_len(&self) -> usize
Returns the length of the packed bytes.
Source§fn pack<W: Write>(&self, writer: &mut W) -> Result<(), Self::Error>
fn pack<W: Write>(&self, writer: &mut W) -> Result<(), Self::Error>
Packs the instance to bytes and writes them to the passed writer.
Source§fn unpack_inner<R: Read + ?Sized, const CHECK: bool>(
reader: &mut R,
) -> Result<Self, Self::Error>
fn unpack_inner<R: Read + ?Sized, const CHECK: bool>( reader: &mut R, ) -> Result<Self, Self::Error>
Reads bytes from the passed reader and unpacks them into an instance.
Source§fn pack_new(&self) -> Vec<u8> ⓘ
fn pack_new(&self) -> Vec<u8> ⓘ
Packs the instance to bytes and writes them to a newly allocated vector.
Source§impl PartialEq for LedgerIndex
impl PartialEq for LedgerIndex
Source§impl PartialOrd for LedgerIndex
impl PartialOrd for LedgerIndex
impl Copy for LedgerIndex
impl Eq for LedgerIndex
impl StructuralPartialEq for LedgerIndex
Auto Trait Implementations§
impl Freeze for LedgerIndex
impl RefUnwindSafe for LedgerIndex
impl Send for LedgerIndex
impl Sync for LedgerIndex
impl Unpin for LedgerIndex
impl UnwindSafe for LedgerIndex
Blanket Implementations§
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