pub struct TransparencyLog { /* private fields */ }Expand description
The log itself. Holds leaf hashes only: the entries are the caller’s.
Implementations§
Source§impl TransparencyLog
impl TransparencyLog
pub fn new() -> Self
pub fn len(&self) -> u64
pub fn is_empty(&self) -> bool
Sourcepub fn root_at(&self, size: u64) -> Result<Hash, LogError>
pub fn root_at(&self, size: u64) -> Result<Hash, LogError>
The root the log had when it held size entries. A log can always
re-derive its own past roots, which is what lets it answer an audit.
Sourcepub fn prove_inclusion(
&self,
index: u64,
size: u64,
) -> Result<InclusionProof, LogError>
pub fn prove_inclusion( &self, index: u64, size: u64, ) -> Result<InclusionProof, LogError>
An audit path for index in the log as it stands at size.
Sourcepub fn prove_consistency(
&self,
old_size: u64,
new_size: u64,
) -> Result<ConsistencyProof, LogError>
pub fn prove_consistency( &self, old_size: u64, new_size: u64, ) -> Result<ConsistencyProof, LogError>
A proof that the log of old_size is a prefix of the log of new_size.
Trait Implementations§
Source§impl Clone for TransparencyLog
impl Clone for TransparencyLog
Source§impl Debug for TransparencyLog
impl Debug for TransparencyLog
Auto Trait Implementations§
impl Forget for TransparencyLog
impl Freeze for TransparencyLog
impl Move for TransparencyLog
impl RefUnwindSafe for TransparencyLog
impl Send for TransparencyLog
impl Sync for TransparencyLog
impl Unpin for TransparencyLog
impl UnsafeUnpin for TransparencyLog
impl UnwindSafe for TransparencyLog
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