[][src]Trait sp_inherents::ProvideInherent

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

    const INHERENT_IDENTIFIER: InherentIdentifier;

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

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

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

Associated Types

type Call

The call type of the module.

type Error: Encode + IsFatalError

The error returned by check_inherent.

Loading content...

Associated Constants

const INHERENT_IDENTIFIER: InherentIdentifier

The inherent identifier used by this inherent.

Loading content...

Required methods

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

Create an inherent out of the given InherentData.

Loading content...

Provided methods

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

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

Loading content...

Implementors

Loading content...