pub struct ConsistencyProofPart {
pub subtree: (u64, u64),
pub server_hash: [u8; 32],
}Expand description
A subtree hash provided by the server in a consistency proof.
Fields§
§subtree: (u64, u64)(start, non-inclusive end)
server_hash: [u8; 32]The hash of this subtree as from the proof
Implementations§
Source§impl ConsistencyProofPart
impl ConsistencyProofPart
Sourcepub fn verify(&self, leaf_hashes: &[[u8; 32]]) -> Result<(), String>
pub fn verify(&self, leaf_hashes: &[[u8; 32]]) -> Result<(), String>
Verify that an array of leaf_hashes could reconstruct this subtree’s
server_hash, returning Ok(()) when success and Err(String) when
failure, with a string describing the reason of failure.
This function is only useful to those who want to do some custom API calling.
If you’re using a CTClient, it will handle proof
checking for you.
§Panic
verify panics when leaf_hashes does not have the right length, which
should be subtree.1 - subtree.0.
Auto Trait Implementations§
impl Freeze for ConsistencyProofPart
impl RefUnwindSafe for ConsistencyProofPart
impl Send for ConsistencyProofPart
impl Sync for ConsistencyProofPart
impl Unpin for ConsistencyProofPart
impl UnsafeUnpin for ConsistencyProofPart
impl UnwindSafe for ConsistencyProofPart
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