[][src]Trait sp_inherents::ProvideInherentData

pub trait ProvideInherentData {
    pub fn inherent_identifier(&self) -> &'static InherentIdentifier;
pub fn provide_inherent_data(
        &self,
        inherent_data: &mut InherentData
    ) -> Result<(), Error>;
pub fn error_to_string(&self, error: &[u8]) -> Option<String>; pub fn on_register(&self, _: &InherentDataProviders) -> Result<(), Error> { ... } }

Something that provides inherent data.

Required methods

pub fn inherent_identifier(&self) -> &'static InherentIdentifier[src]

The identifier of the inherent for that data will be provided.

pub fn provide_inherent_data(
    &self,
    inherent_data: &mut InherentData
) -> Result<(), Error>
[src]

Provide inherent data that should be included in a block.

The data should be stored in the given InherentData structure.

pub fn error_to_string(&self, error: &[u8]) -> Option<String>[src]

Convert the given encoded error to a string.

If the given error could not be decoded, None should be returned.

Loading content...

Provided methods

pub fn on_register(&self, _: &InherentDataProviders) -> Result<(), Error>[src]

Is called when this inherent data provider is registered at the given InherentDataProviders.

Loading content...

Implementors

Loading content...