pub type Digest = Digest;
Expand description
The digest of a block.
Aliased Type§
struct Digest {
pub logs: Vec<DigestItem>,
}
Fields§
§logs: Vec<DigestItem>
A list of logs in the digest.
Implementations
§impl Digest
impl Digest
pub fn logs(&self) -> &[DigestItem]
pub fn logs(&self) -> &[DigestItem]
Get reference to all digest items.
pub fn push(&mut self, item: DigestItem)
pub fn push(&mut self, item: DigestItem)
Push new digest item.
pub fn log<T, F>(&self, predicate: F) -> Option<&T>
pub fn log<T, F>(&self, predicate: F) -> Option<&T>
Get reference to the first digest item that matches the passed predicate.
pub fn convert_first<T, F>(&self, predicate: F) -> Option<T>
pub fn convert_first<T, F>(&self, predicate: F) -> Option<T>
Get a conversion of the first digest item that successfully converts using the function.
Trait Implementations
§impl Decode for Digest
impl Decode for Digest
§fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Digest, Error>where
__CodecInputEdqy: Input,
fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Digest, Error>where
__CodecInputEdqy: Input,
Attempt to deserialise the value from input.
§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
Attempt to skip the encoded value from input. Read more
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
§impl<'de> Deserialize<'de> for Digest
impl<'de> Deserialize<'de> for Digest
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Digest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Digest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Encode for Digest
impl Encode for Digest
§fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
Convert self to a slice and append it to the destination.
§fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>(
&self,
f: __CodecUsingEncodedCallback,
) -> __CodecOutputReturn
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
Convert self to a slice and then invoke the given closure with it.
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
§impl Serialize for Digest
impl Serialize for Digest
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more