pub struct CommitProof {
pub root: CommitHash,
pub proof: MerkleProof<Sha256>,
pub length: usize,
pub indices: Vec<usize>,
}
Expand description
Represents a root hash and a proof of certain nodes.
Fields§
§root: CommitHash
Root hash.
proof: MerkleProof<Sha256>
Merkle proof.
length: usize
Length of the tree.
indices: Vec<usize>
Indices to prove.
Implementations§
Source§impl CommitProof
impl CommitProof
Sourcepub fn root(&self) -> &CommitHash
pub fn root(&self) -> &CommitHash
Root hash for the proof.
Trait Implementations§
Source§impl Clone for CommitProof
impl Clone for CommitProof
Source§impl Debug for CommitProof
impl Debug for CommitProof
Source§impl Decodable for CommitProof
impl Decodable for CommitProof
Source§impl Default for CommitProof
impl Default for CommitProof
Source§impl<'de> Deserialize<'de> for CommitProof
impl<'de> Deserialize<'de> for CommitProof
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 Encodable for CommitProof
impl Encodable for CommitProof
Source§fn encode<'life0, 'life1, 'async_trait, W>(
&'life0 self,
writer: &'life1 mut BinaryWriter<W>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
W: 'async_trait + AsyncWrite + AsyncSeek + Unpin + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn encode<'life0, 'life1, 'async_trait, W>(
&'life0 self,
writer: &'life1 mut BinaryWriter<W>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
W: 'async_trait + AsyncWrite + AsyncSeek + Unpin + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Encode self into the binary writer.
Source§impl From<CommitProof> for (CommitHash, usize)
impl From<CommitProof> for (CommitHash, usize)
Source§fn from(value: CommitProof) -> Self
fn from(value: CommitProof) -> Self
Converts to this type from the input type.
Source§impl From<CommitProof> for CommitHash
impl From<CommitProof> for CommitHash
Source§fn from(value: CommitProof) -> Self
fn from(value: CommitProof) -> Self
Converts to this type from the input type.
Source§impl Hash for CommitProof
impl Hash for CommitProof
Source§impl PartialEq for CommitProof
impl PartialEq for CommitProof
Source§impl Serialize for CommitProof
impl Serialize for CommitProof
impl Eq for CommitProof
Auto Trait Implementations§
impl Freeze for CommitProof
impl RefUnwindSafe for CommitProof
impl Send for CommitProof
impl Sync for CommitProof
impl Unpin for CommitProof
impl UnwindSafe for CommitProof
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