pub struct SnapshotHeader { /* private fields */ }Expand description
Describes a snapshot header common to full and delta snapshots.
Implementations§
Source§impl SnapshotHeader
impl SnapshotHeader
Sourcepub fn kind(&self) -> SnapshotKind
pub fn kind(&self) -> SnapshotKind
Returns the kind of a SnapshotHeader.
Sourcepub fn network_id(&self) -> u64
pub fn network_id(&self) -> u64
Returns the network id of a SnapshotHeader.
Sourcepub fn sep_index(&self) -> MilestoneIndex
pub fn sep_index(&self) -> MilestoneIndex
Returns the solid entry point index of a SnapshotHeader.
Sourcepub fn ledger_index(&self) -> MilestoneIndex
pub fn ledger_index(&self) -> MilestoneIndex
Returns the ledger index of a SnapshotHeader.
Trait Implementations§
Source§impl Clone for SnapshotHeader
impl Clone for SnapshotHeader
Source§fn clone(&self) -> SnapshotHeader
fn clone(&self) -> SnapshotHeader
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 Packable for SnapshotHeader
impl Packable for SnapshotHeader
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.
Auto Trait Implementations§
impl Freeze for SnapshotHeader
impl RefUnwindSafe for SnapshotHeader
impl Send for SnapshotHeader
impl Sync for SnapshotHeader
impl Unpin for SnapshotHeader
impl UnwindSafe for SnapshotHeader
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