pub struct GenerationRecord { /* private fields */ }Expand description
GenerationRecord
Diagnostic metadata for one committed ledger generation.
Implementations§
Source§impl GenerationRecord
impl GenerationRecord
Sourcepub fn new(
generation: u64,
parent_generation: Option<u64>,
runtime_fingerprint: Option<String>,
declaration_count: u32,
committed_at: Option<u64>,
) -> Result<Self, DeclarationSnapshotError>
pub fn new( generation: u64, parent_generation: Option<u64>, runtime_fingerprint: Option<String>, declaration_count: u32, committed_at: Option<u64>, ) -> Result<Self, DeclarationSnapshotError>
Build a committed generation diagnostic record after validating metadata.
Sourcepub const fn generation(&self) -> u64
pub const fn generation(&self) -> u64
Return the committed generation number.
Sourcepub const fn parent_generation(&self) -> Option<u64>
pub const fn parent_generation(&self) -> Option<u64>
Return the parent generation, if recorded.
Sourcepub fn runtime_fingerprint(&self) -> Option<&str>
pub fn runtime_fingerprint(&self) -> Option<&str>
Borrow the optional binary/runtime fingerprint.
Sourcepub const fn declaration_count(&self) -> u32
pub const fn declaration_count(&self) -> u32
Return the number of declarations in the generation.
Sourcepub const fn committed_at(&self) -> Option<u64>
pub const fn committed_at(&self) -> Option<u64>
Return the optional commit timestamp supplied by the integration layer.
Trait Implementations§
Source§impl Clone for GenerationRecord
impl Clone for GenerationRecord
Source§fn clone(&self) -> GenerationRecord
fn clone(&self) -> GenerationRecord
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 moreSource§impl Debug for GenerationRecord
impl Debug for GenerationRecord
Source§impl<'de> Deserialize<'de> for GenerationRecord
impl<'de> Deserialize<'de> for GenerationRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GenerationRecord
impl PartialEq for GenerationRecord
Source§fn eq(&self, other: &GenerationRecord) -> bool
fn eq(&self, other: &GenerationRecord) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for GenerationRecord
impl Serialize for GenerationRecord
impl Eq for GenerationRecord
impl StructuralPartialEq for GenerationRecord
Auto Trait Implementations§
impl Freeze for GenerationRecord
impl RefUnwindSafe for GenerationRecord
impl Send for GenerationRecord
impl Sync for GenerationRecord
impl Unpin for GenerationRecord
impl UnsafeUnpin for GenerationRecord
impl UnwindSafe for GenerationRecord
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