pub struct ChainProgress {
pub genesis: String,
pub next_seq: u64,
pub last_hash: String,
pub failure: Option<String>,
}Expand description
Where a hash-chain check stands after the first entries of a log: the
number the next entry must carry, the hash it must link to, and the first
failure. A long log is checked one segment at a time by passing this from
one verify_chain_segment call to the next, so memory stays bounded by
one segment however long the log is. The verdict is the one
verify_blackbox_chain gives for the whole log.
Fields§
§genesis: StringThe prevHash of entry 0.
next_seq: u64The number of entries checked so far (the next entry’s seq).
last_hash: StringThe entryHash of the last entry checked, or the genesis.
failure: Option<String>The first failure; once set, later segments are not read.
Implementations§
Source§impl ChainProgress
impl ChainProgress
Sourcepub fn start(genesis_prev_hash_override: Option<&str>) -> Self
pub fn start(genesis_prev_hash_override: Option<&str>) -> Self
The start of a log. A None genesis uses genesis_prev_hash.
Sourcepub fn result(&self) -> ChainResult
pub fn result(&self) -> ChainResult
The verdict over every entry checked so far.
Trait Implementations§
Source§impl Clone for ChainProgress
impl Clone for ChainProgress
Source§impl Debug for ChainProgress
impl Debug for ChainProgress
impl Eq for ChainProgress
Source§impl PartialEq for ChainProgress
impl PartialEq for ChainProgress
impl StructuralPartialEq for ChainProgress
Auto Trait Implementations§
impl Forget for ChainProgress
impl Freeze for ChainProgress
impl Move for ChainProgress
impl RefUnwindSafe for ChainProgress
impl Send for ChainProgresswhere
RawVecInner: Send,
impl Sync for ChainProgresswhere
RawVecInner: Sync,
impl Unpin for ChainProgress
impl UnsafeUnpin for ChainProgress
impl UnwindSafe for ChainProgresswhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.