pub struct MerkleRoot {
pub value: Option<Hash>,
}
Fields§
§value: Option<Hash>
Trait Implementations§
Source§impl Clone for MerkleRoot
impl Clone for MerkleRoot
Source§fn clone(&self) -> MerkleRoot
fn clone(&self) -> MerkleRoot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MerkleRoot
impl Debug for MerkleRoot
Source§impl Default for MerkleRoot
impl Default for MerkleRoot
Source§fn default() -> MerkleRoot
fn default() -> MerkleRoot
Returns the “default value” for a type. Read more
Source§impl From<Hash> for MerkleRoot
impl From<Hash> for MerkleRoot
Source§fn from(root: MerkleRoot) -> MerkleRoot
fn from(root: MerkleRoot) -> MerkleRoot
Converts to this type from the input type.
Source§impl Message for MerkleRoot
impl Message for MerkleRoot
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.Source§impl TryFrom<MerkleRoot> for MerkleRoot
impl TryFrom<MerkleRoot> for MerkleRoot
Source§type Error = ProtocolError
type Error = ProtocolError
The type returned in the event of a conversion error.
Source§fn try_from(root: MerkleRoot) -> Result<MerkleRoot, Self::Error>
fn try_from(root: MerkleRoot) -> Result<MerkleRoot, Self::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for MerkleRoot
impl RefUnwindSafe for MerkleRoot
impl Send for MerkleRoot
impl Sync for MerkleRoot
impl Unpin for MerkleRoot
impl UnwindSafe for MerkleRoot
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