Struct sos_sdk::commit::CommitProof
source · 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>
The merkle proof.
length: usize
The 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 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
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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