Skip to main content

Seal

Struct Seal 

Source
pub struct Seal {
Show 17 fields pub format: String, pub source: String, pub nominal_first: u32, pub nominal_last: u32, pub first_ledger: u32, pub last_ledger: u32, pub records: u64, pub out_of_window: u64, pub coverage_first: u32, pub coverage_last: u32, pub missing_ledgers: Vec<[u32; 2]>, pub opened_ms: u64, pub sealed_ms: u64, pub raw_bytes: u64, pub raw_hash: String, pub prev_seal_hash: Option<String>, pub seal_hash: String,
}

Fields§

§format: String§source: String

Which of our machines received these validations.

§nominal_first: u32

Nominal range of the segment: [nominal_first, nominal_last].

§nominal_last: u32§first_ledger: u32

Lowest and highest ledgers among records from our network. Late validations from earlier ranges and early ones from the next range also land here.

§last_ledger: u32§records: u64§out_of_window: u64

How many of records are far from the network’s current ledger: validations from other networks that leaked in through peer relaying, or ones that arrived very late. They are stored, but do not count toward completeness or the first/last ledgers.

§coverage_first: u32

The span this segment is responsible for keeping complete: from the ledger after the last one in the previous seal up to its own last ledger. Spans of adjacent segments meet with no gaps or overlaps, so archiver downtime shows up as a gap in the next seal instead of vanishing between them.

§coverage_last: u32§missing_ledgers: Vec<[u32; 2]>

Ledgers in the coverage span for which no validation arrived at all, as [from, to] ranges. A direct measure of completeness.

§opened_ms: u64§sealed_ms: u64§raw_bytes: u64

Uncompressed size of the segment content.

§raw_hash: String

SHA-512Half of the uncompressed segment content, in hex.

§prev_seal_hash: Option<String>

Hash of this source’s previous seal; None for the very first one.

§seal_hash: String

Implementations§

Source§

impl Seal

Source

pub fn compute_hash(&self) -> String

Seal hash: over all fields except seal_hash itself.

Source

pub fn finalize(self) -> Seal

Source

pub fn is_intact(&self) -> bool

The seal has not been altered since it was sealed.

Trait Implementations§

Source§

impl Clone for Seal

Source§

fn clone(&self) -> Seal

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Seal

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Seal

Source§

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 Eq for Seal

Source§

impl PartialEq for Seal

Source§

fn eq(&self, other: &Seal) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Seal

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Seal

Auto Trait Implementations§

§

impl Freeze for Seal

§

impl RefUnwindSafe for Seal

§

impl Send for Seal

§

impl Sync for Seal

§

impl Unpin for Seal

§

impl UnsafeUnpin for Seal

§

impl UnwindSafe for Seal

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.