pub struct VecLog<D, V>where
D: SupportedDigest,
V: VisitBytes,{ /* private fields */ }Expand description
A verifiable log where the node hashes are stored contiguously in memory by index.
Implementations§
Source§impl<D, V> VecLog<D, V>where
D: SupportedDigest,
V: VisitBytes,
Height is the number of child-edges between the node and leaves
A leaf has height 0
impl<D, V> VecLog<D, V>where
D: SupportedDigest,
V: VisitBytes,
Height is the number of child-edges between the node and leaves A leaf has height 0
Length is the number of total leaf nodes present
Trait Implementations§
Source§impl<D, V> AsRef<[Hash<D>]> for VecLog<D, V>where
D: SupportedDigest,
V: VisitBytes,
impl<D, V> AsRef<[Hash<D>]> for VecLog<D, V>where
D: SupportedDigest,
V: VisitBytes,
Source§impl<D, V> Default for VecLog<D, V>where
D: SupportedDigest,
V: VisitBytes,
impl<D, V> Default for VecLog<D, V>where
D: SupportedDigest,
V: VisitBytes,
Source§impl<D, V> From<VecLog<D, V>> for VecLogwhere
D: SupportedDigest,
V: VisitBytes,
impl<D, V> From<VecLog<D, V>> for VecLogwhere
D: SupportedDigest,
V: VisitBytes,
Source§impl<D, V> LogBuilder<D, V> for VecLog<D, V>where
D: SupportedDigest,
V: VisitBytes,
impl<D, V> LogBuilder<D, V> for VecLog<D, V>where
D: SupportedDigest,
V: VisitBytes,
Source§fn checkpoint(&self) -> Checkpoint<D>
fn checkpoint(&self) -> Checkpoint<D>
Get the checkpoint (hash and length) of the log at this point.
Source§impl<D, V> LogData<D, V> for VecLog<D, V>where
D: SupportedDigest,
V: VisitBytes,
impl<D, V> LogData<D, V> for VecLog<D, V>where
D: SupportedDigest,
V: VisitBytes,
Source§fn hash_for(&self, node: Node) -> Option<Hash<D>>
fn hash_for(&self, node: Node) -> Option<Hash<D>>
Get the hash for a given node
None if node does not yet exist
Source§fn prove_inclusion(&self, leaf: Node, log_length: usize) -> InclusionProof<D, V>
fn prove_inclusion(&self, leaf: Node, log_length: usize) -> InclusionProof<D, V>
Construct an inclusion proof for this log
Source§fn prove_consistency(
&self,
old_length: usize,
new_length: usize,
) -> ConsistencyProof<D, V>
fn prove_consistency( &self, old_length: usize, new_length: usize, ) -> ConsistencyProof<D, V>
Construct a consistency proof for this log
Auto Trait Implementations§
impl<D, V> Freeze for VecLog<D, V>
impl<D, V> RefUnwindSafe for VecLog<D, V>where
V: RefUnwindSafe,
<<D as OutputSizeUser>::OutputSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
impl<D, V> Send for VecLog<D, V>where
V: Send,
impl<D, V> Sync for VecLog<D, V>where
V: Sync,
impl<D, V> Unpin for VecLog<D, V>
impl<D, V> UnwindSafe for VecLog<D, V>
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