Trait sp_inherents::ProvideInherentData
source · [−]pub trait ProvideInherentData {
fn inherent_identifier(&self) -> &'static InherentIdentifier;
fn provide_inherent_data(
&self,
inherent_data: &mut InherentData
) -> Result<(), Error>;
fn error_to_string(&self, error: &[u8]) -> Option<String>;
fn on_register(&self, _: &InherentDataProviders) -> Result<(), Error> { ... }
}
Expand description
Something that provides inherent data.
Required methods
fn inherent_identifier(&self) -> &'static InherentIdentifier
fn inherent_identifier(&self) -> &'static InherentIdentifier
The identifier of the inherent for that data will be provided.
fn provide_inherent_data(
&self,
inherent_data: &mut InherentData
) -> Result<(), Error>
fn provide_inherent_data(
&self,
inherent_data: &mut InherentData
) -> Result<(), Error>
Provide inherent data that should be included in a block.
The data should be stored in the given InherentData
structure.
Provided methods
fn on_register(&self, _: &InherentDataProviders) -> Result<(), Error>
fn on_register(&self, _: &InherentDataProviders) -> Result<(), Error>
Is called when this inherent data provider is registered at the given
InherentDataProviders
.