[][src]Trait sp_inherents::ProvideInherent

pub trait ProvideInherent {
    type Call;
    type Error: Encode + IsFatalError;

    pub const INHERENT_IDENTIFIER: InherentIdentifier;

    pub fn create_inherent(data: &InherentData) -> Option<Self::Call>;

    pub fn is_inherent_required(
        _: &InherentData
    ) -> Result<Option<Self::Error>, Self::Error> { ... }
pub fn check_inherent(
        _: &Self::Call,
        _: &InherentData
    ) -> Result<(), Self::Error> { ... } }

A module that provides an inherent and may also verifies it.

Associated Types

type Call[src]

The call type of the module.

type Error: Encode + IsFatalError[src]

The error returned by check_inherent.

Loading content...

Associated Constants

pub const INHERENT_IDENTIFIER: InherentIdentifier[src]

The inherent identifier used by this inherent.

Loading content...

Required methods

pub fn create_inherent(data: &InherentData) -> Option<Self::Call>[src]

Create an inherent out of the given InherentData.

Loading content...

Provided methods

pub fn is_inherent_required(
    _: &InherentData
) -> Result<Option<Self::Error>, Self::Error>
[src]

If Some, indicates that an inherent is required. Check will return the inner error if no inherent is found. If Err, indicates that the check failed and further operations should be aborted.

pub fn check_inherent(
    _: &Self::Call,
    _: &InherentData
) -> Result<(), Self::Error>
[src]

Check the given inherent if it is valid. Checking the inherent is optional and can be omitted.

Loading content...

Implementors

Loading content...