Struct sos_sdk::commit::CommitProof
source · pub struct CommitProof {
pub root: <Sha256 as Hasher>::Hash,
pub proof: MerkleProof<Sha256>,
pub length: usize,
pub indices: Range<usize>,
}Expand description
Represents a root hash and a proof of certain nodes.
Fields§
§root: <Sha256 as Hasher>::HashRoot hash.
proof: MerkleProof<Sha256>The merkle proof.
length: usizeThe length of the tree.
indices: Range<usize>Range of indices.
Implementations§
source§impl CommitProof
impl CommitProof
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§fn decode<'life0, 'life1, 'async_trait, R>(
&'life0 mut self,
reader: &'life1 mut BinaryReader<R>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
R: 'async_trait + AsyncRead + AsyncSeek + Unpin + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn decode<'life0, 'life1, 'async_trait, R>( &'life0 mut self, reader: &'life1 mut BinaryReader<R> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where R: 'async_trait + AsyncRead + AsyncSeek + Unpin + Send, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Decode from the binary reader into self.
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<CommitProof, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<CommitProof, 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 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 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<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>
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.