[−][src]Struct ctclient::internal::ConsistencyProofPart
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
impl ConsistencyProofPart
[src]
pub fn verify(&self, leaf_hashes: &[[u8; 32]]) -> Result<(), String>
[src]
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 RefUnwindSafe for ConsistencyProofPart
impl Send for ConsistencyProofPart
impl Sync for ConsistencyProofPart
impl Unpin for ConsistencyProofPart
impl UnwindSafe for ConsistencyProofPart
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,