[][src]Struct sp_runtime::Digest

pub struct Digest<Hash> {
    pub logs: Vec<DigestItem<Hash>>,
}

Generic header digest.

Fields

logs: Vec<DigestItem<Hash>>

A list of logs in the digest.

Implementations

impl<Hash> Digest<Hash>[src]

pub fn logs(&self) -> &[DigestItem<Hash>]

Notable traits for &'_ mut [u8]

impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [u8]
[src]

Get reference to all digest items.

pub fn push(&mut self, item: DigestItem<Hash>)[src]

Push new digest item.

pub fn pop(&mut self) -> Option<DigestItem<Hash>>[src]

Pop a digest item.

pub fn log<T: ?Sized, F: Fn(&DigestItem<Hash>) -> Option<&T>>(
    &self,
    predicate: F
) -> Option<&T>
[src]

Get reference to the first digest item that matches the passed predicate.

pub fn convert_first<T, F: Fn(&DigestItem<Hash>) -> Option<T>>(
    &self,
    predicate: F
) -> Option<T>
[src]

Get a conversion of the first digest item that successfully converts using the function.

Trait Implementations

impl<Hash: Clone> Clone for Digest<Hash>[src]

impl<Hash> Debug for Digest<Hash> where
    Hash: Debug
[src]

impl<Hash> Decode for Digest<Hash> where
    Vec<DigestItem<Hash>>: Decode,
    Vec<DigestItem<Hash>>: Decode, 
[src]

impl<Item> Default for Digest<Item>[src]

impl<'de, Hash> Deserialize<'de> for Digest<Hash> where
    Hash: Codec, 
[src]

impl<Hash> Encode for Digest<Hash> where
    Vec<DigestItem<Hash>>: Encode,
    Vec<DigestItem<Hash>>: Encode, 
[src]

impl<Hash> EncodeLike<Digest<Hash>> for Digest<Hash> where
    Vec<DigestItem<Hash>>: Encode,
    Vec<DigestItem<Hash>>: Encode, 
[src]

impl<Hash: Eq> Eq for Digest<Hash>[src]

impl<Hash> MallocSizeOf for Digest<Hash> where
    Hash: MallocSizeOf, 
[src]

impl<Hash: PartialEq> PartialEq<Digest<Hash>> for Digest<Hash>[src]

impl<Hash> Serialize for Digest<Hash> where
    Hash: Codec, 
[src]

impl<Hash> StructuralEq for Digest<Hash>[src]

impl<Hash> StructuralPartialEq for Digest<Hash>[src]

Auto Trait Implementations

impl<Hash> RefUnwindSafe for Digest<Hash> where
    Hash: RefUnwindSafe

impl<Hash> Send for Digest<Hash> where
    Hash: Send

impl<Hash> Sync for Digest<Hash> where
    Hash: Sync

impl<Hash> Unpin for Digest<Hash> where
    Hash: Unpin

impl<Hash> UnwindSafe for Digest<Hash> where
    Hash: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedConversion for T[src]

impl<T> Clear for T where
    T: PartialEq<T> + Eq + Default
[src]

impl<S> Codec for S where
    S: Encode + Decode, 

impl<T> DecodeAll for T where
    T: Decode, 

impl<T> DecodeLimit for T where
    T: Decode, 

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<'_, '_, T> EncodeLike<&'_ &'_ T> for T where
    T: Encode, 

impl<'_, T> EncodeLike<&'_ T> for T where
    T: Encode, 

impl<'_, T> EncodeLike<&'_ mut T> for T where
    T: Encode, 

impl<T> EncodeLike<Arc<T>> for T where
    T: Encode, 

impl<T> EncodeLike<Box<T, Global>> for T where
    T: Encode, 

impl<'a, T> EncodeLike<Cow<'a, T>> for T where
    T: Encode + ToOwned

impl<T> EncodeLike<Rc<T>> for T where
    T: Encode, 

impl<T> From<T> for T[src]

impl<S> FullCodec for S where
    S: Decode + FullEncode, 

impl<S> FullEncode for S where
    S: Encode + EncodeLike<S>, 

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    Outer: AsRef<T> + AsMut<T> + From<T>,
    T: From<Outer>, 
[src]

pub fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

pub fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> KeyedVec for T where
    T: Codec, 

impl<T> MallocSizeOfExt for T where
    T: MallocSizeOf, 

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeMallocSizeOf for T where
    T: MallocSizeOf, 
[src]

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe
[src]

impl<T> MaybeSerialize for T where
    T: Serialize
[src]

impl<T> MaybeSerializeDeserialize for T where
    T: DeserializeOwned + Serialize
[src]

impl<T> Member for T where
    T: 'static + Clone + PartialEq<T> + Eq + Send + Sync + Debug
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T, S> UniqueSaturatedInto<T> for S where
    S: TryInto<T>,
    T: Bounded
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,