Struct sp_inherents::CheckInherentsResult[][src]

pub struct CheckInherentsResult { /* fields omitted */ }

The result of checking inherents.

It either returns okay for all checks, stores all occurred errors or just one fatal error.

When a fatal error occurs, all other errors are removed and the implementation needs to abort checking inherents.


impl CheckInherentsResult[src]

pub fn new() -> Self[src]

Create a new instance.

pub fn put_error<E: Encode + IsFatalError>(
    &mut self,
    identifier: InherentIdentifier,
    error: &E
) -> Result<(), Error>

Put an error into the result.

This makes this result resolve to ok() == false.


  • identifier - The identifier of the inherent that generated the error.
  • error - The error that will be encoded.

pub fn get_error<E: Decode>(
    identifier: &InherentIdentifier
) -> Result<Option<E>, Error>

Get an error out of the result.


  • Ok(Some(I)) if the error could be found and deserialized.
  • Ok(None) if the error could not be found.
  • Err(_) if the error could be found, but deserialization did not work.

pub fn into_errors(self) -> IntoIter<InherentIdentifier, Vec<u8>>[src]

Convert into an iterator over all contained errors.

pub fn ok(&self) -> bool[src]

Is this result ok?

pub fn fatal_error(&self) -> bool[src]

Is this a fatal error?

Trait Implementations

impl Clone for CheckInherentsResult[src]

impl Decode for CheckInherentsResult[src]

impl Default for CheckInherentsResult[src]

impl Encode for CheckInherentsResult[src]

impl EncodeLike<CheckInherentsResult> for CheckInherentsResult[src]

impl PartialEq<CheckInherentsResult> for CheckInherentsResult[src]

Auto Trait Implementations

impl RefUnwindSafe for CheckInherentsResult

impl Send for CheckInherentsResult

impl Sync for CheckInherentsResult

impl Unpin for CheckInherentsResult

impl UnwindSafe for CheckInherentsResult

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

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

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

impl<T> DynClone for T where
    T: Clone

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: ToOwned + Encode, 

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>, 

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

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> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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>, 

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