pub struct MerkleProof<T: Serialize> {
pub index: usize,
pub hash_chain: Vec<[u8; 32]>,
/* private fields */
}Expand description
A proof that a given datum is at a given index.
Note that the proof does not store the data itself, but it needs to be
provided to MerkleProof::verify().
Fields§
§index: usizeThe index of the datum for which this is the proof.
hash_chain: Vec<[u8; 32]>Hash chain leading up to the root node
Implementations§
Trait Implementations§
Source§impl<T: Serialize> Debug for MerkleProof<T>
impl<T: Serialize> Debug for MerkleProof<T>
Source§impl<'de, T: Serialize> Deserialize<'de> for MerkleProof<T>
impl<'de, T: Serialize> Deserialize<'de> for MerkleProof<T>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: Serialize> Serialize for MerkleProof<T>
impl<T: Serialize> Serialize for MerkleProof<T>
impl<T: Serialize> StructuralPartialEq for MerkleProof<T>
Auto Trait Implementations§
impl<T> Freeze for MerkleProof<T>
impl<T> RefUnwindSafe for MerkleProof<T>where
T: RefUnwindSafe,
impl<T> Send for MerkleProof<T>where
T: Send,
impl<T> Sync for MerkleProof<T>where
T: Sync,
impl<T> Unpin for MerkleProof<T>where
T: Unpin,
impl<T> UnwindSafe for MerkleProof<T>where
T: 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more