Struct cfx_storage::storage_db::snapshot_db::SnapshotInfo
source · pub struct SnapshotInfo {
pub snapshot_info_kept_to_provide_sync: SnapshotKeptToProvideSyncStatus,
pub serve_one_step_sync: bool,
pub merkle_root: MerkleHash,
pub parent_snapshot_height: u64,
pub height: u64,
pub parent_snapshot_epoch_id: EpochId,
pub pivot_chain_parts: Vec<EpochId>,
}
Fields§
§snapshot_info_kept_to_provide_sync: SnapshotKeptToProvideSyncStatus
This field is true when the snapshot info is kept but the snapshot itself is removed, or when
serve_one_step_sync: bool
§merkle_root: MerkleHash
§parent_snapshot_height: u64
§height: u64
§parent_snapshot_epoch_id: EpochId
§pivot_chain_parts: Vec<EpochId>
Implementations§
source§impl SnapshotInfo
impl SnapshotInfo
pub fn genesis_snapshot_info() -> Self
pub fn get_snapshot_epoch_id(&self) -> &EpochId
pub fn get_epoch_id_at_height(&self, height: u64) -> Option<&EpochId>
Trait Implementations§
source§impl Clone for SnapshotInfo
impl Clone for SnapshotInfo
source§fn clone(&self) -> SnapshotInfo
fn clone(&self) -> SnapshotInfo
Returns a copy 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 SnapshotInfo
impl Debug for SnapshotInfo
source§impl Decodable for SnapshotInfo
impl Decodable for SnapshotInfo
source§impl Default for SnapshotInfo
impl Default for SnapshotInfo
source§fn default() -> SnapshotInfo
fn default() -> SnapshotInfo
Returns the “default value” for a type. Read more
source§impl Encodable for SnapshotInfo
impl Encodable for SnapshotInfo
source§impl MallocSizeOf for SnapshotInfo
impl MallocSizeOf for SnapshotInfo
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Auto Trait Implementations§
impl RefUnwindSafe for SnapshotInfo
impl Send for SnapshotInfo
impl Sync for SnapshotInfo
impl Unpin for SnapshotInfo
impl UnwindSafe for SnapshotInfo
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