[][src]Struct sp_inherents::CheckInherentsResult

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.

Implementations

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>
[src]

Put an error into the result.

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

Parameters

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

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

Get an error out of the result.

Return

  • 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
[src]

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

impl<T> BorrowMut<T> for T where
    T: ?Sized
[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> 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>, 

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

Get a reference to the inner from the outer.

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

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
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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

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