[−][src]Struct sp_inherents::CheckInherentsResult
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][−]
&mut self,
identifier: InherentIdentifier,
error: &E
) -> Result<(), Error>
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][−]
&self,
identifier: &InherentIdentifier
) -> Result<Option<E>, Error>
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][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
[src][+]
T: InitializableFromZeroed + ?Sized,
impl<S> Codec for S where
S: Encode + Decode,
[src]
S: Encode + Decode,
impl<T, X> Decode for X where
T: Decode + Into<X>,
X: WrapperTypeDecode<Wrapped = T>,
[src][+]
T: Decode + Into<X>,
X: WrapperTypeDecode<Wrapped = T>,
impl<T> DecodeAll for T where
T: Decode,
[src][+]
T: Decode,
impl<T> DecodeLimit for T where
T: Decode,
[src][+]
T: Decode,
impl<T, X> Encode for X where
T: Encode + ?Sized,
X: WrapperTypeEncode<Target = T>,
[src][+]
T: Encode + ?Sized,
X: WrapperTypeEncode<Target = T>,
impl<'_, '_, T> EncodeLike<&'_ &'_ T> for T where
T: Encode,
[src]
T: Encode,
impl<'_, T> EncodeLike<&'_ T> for T where
T: Encode,
[src]
T: Encode,
impl<'_, T> EncodeLike<&'_ mut T> for T where
T: Encode,
[src]
T: Encode,
impl<T> EncodeLike<Arc<T>> for T where
T: Encode,
[src]
T: Encode,
impl<T> EncodeLike<Box<T>> for T where
T: Encode,
[src]
T: Encode,
impl<'a, T> EncodeLike<Cow<'a, T>> for T where
T: Encode + ToOwned,
[src]
T: Encode + ToOwned,
impl<T> EncodeLike<Rc<T>> for T where
T: Encode,
[src]
T: Encode,
impl<T> From<T> for T
[src][+]
impl<S> FullCodec for S where
S: Decode + FullEncode,
[src]
S: Decode + FullEncode,
impl<S> FullEncode for S where
S: Encode + EncodeLike<S>,
[src]
S: Encode + EncodeLike<S>,
impl<T> InitializableFromZeroed for T where
T: Default,
[src][+]
T: Default,
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
[src][+]
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T> KeyedVec for T where
T: Codec,
[src][+]
T: Codec,
impl<T> MaybeRefUnwindSafe for T where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src][+]
T: UncheckedFrom<S>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src][+]
V: MultiLane<T>,