pub struct ConsistencyProof<D, V>where
D: SupportedDigest,
V: VisitBytes,{
pub old_length: usize,
pub new_length: usize,
/* private fields */
}Expand description
A proof of the consistency between two points in the logs history.
Fields§
§old_length: usizeThe older of the two points
new_length: usizeThe newer of the two points
Implementations§
Source§impl<D, V> ConsistencyProof<D, V>where
D: SupportedDigest,
V: VisitBytes,
impl<D, V> ConsistencyProof<D, V>where
D: SupportedDigest,
V: VisitBytes,
Sourcepub fn evaluate(
&self,
hashes: &impl LogData<D, V>,
) -> Result<(Hash<D>, Hash<D>), ConsistencyProofError>
pub fn evaluate( &self, hashes: &impl LogData<D, V>, ) -> Result<(Hash<D>, Hash<D>), ConsistencyProofError>
Evaluate an inclusion proof. Callers should verify that the returned root matches their expectation.
Walks the inclusion proof, hashes each layer, returns the root hash.
Sourcepub fn inclusions(
&self,
) -> Result<Vec<InclusionProof<D, V>>, ConsistencyProofError>
pub fn inclusions( &self, ) -> Result<Vec<InclusionProof<D, V>>, ConsistencyProofError>
Convert the consistency proof into a sequence of inclusion proofs. Each inclusion proof verifies that one of the balanced roots of the old tree is present in the root of the new tree.
Trait Implementations§
Source§impl<D, V> Clone for ConsistencyProof<D, V>
impl<D, V> Clone for ConsistencyProof<D, V>
Source§fn clone(&self) -> ConsistencyProof<D, V>
fn clone(&self) -> ConsistencyProof<D, V>
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<D, V> Debug for ConsistencyProof<D, V>
impl<D, V> Debug for ConsistencyProof<D, V>
Source§impl<D, V> PartialEq for ConsistencyProof<D, V>
impl<D, V> PartialEq for ConsistencyProof<D, V>
impl<D, V> Copy for ConsistencyProof<D, V>
impl<D, V> StructuralPartialEq for ConsistencyProof<D, V>where
D: SupportedDigest,
V: VisitBytes,
Auto Trait Implementations§
impl<D, V> Freeze for ConsistencyProof<D, V>
impl<D, V> RefUnwindSafe for ConsistencyProof<D, V>where
D: RefUnwindSafe,
V: RefUnwindSafe,
impl<D, V> Send for ConsistencyProof<D, V>
impl<D, V> Sync for ConsistencyProof<D, V>
impl<D, V> Unpin for ConsistencyProof<D, V>
impl<D, V> UnwindSafe for ConsistencyProof<D, V>where
D: UnwindSafe,
V: 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