pub trait CreateInherentDataProviders<Block: BlockT, ExtraArgs>: Send + Sync {
type InherentDataProviders: InherentDataProvider;
fn create_inherent_data_providers<'life0, 'async_trait>(
&'life0 self,
parent: Block::Hash,
extra_args: ExtraArgs
) -> Pin<Box<dyn Future<Output = Result<Self::InherentDataProviders, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Something that can create inherent data providers.
It is possible for the caller to provide custom arguments to the callee by setting the
ExtraArgs
generic parameter.
The crate already provides some convience implementations of this trait for
Box<dyn CreateInherentDataProviders>
and closures. So, it should not be required to implement
this trait manually.
Required Associated Types§
sourcetype InherentDataProviders: InherentDataProvider
type InherentDataProviders: InherentDataProvider
The inherent data providers that will be created.
Required Methods§
sourcefn create_inherent_data_providers<'life0, 'async_trait>(
&'life0 self,
parent: Block::Hash,
extra_args: ExtraArgs
) -> Pin<Box<dyn Future<Output = Result<Self::InherentDataProviders, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_inherent_data_providers<'life0, 'async_trait>(
&'life0 self,
parent: Block::Hash,
extra_args: ExtraArgs
) -> Pin<Box<dyn Future<Output = Result<Self::InherentDataProviders, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create the inherent data providers at the given parent
block using the given extra_args
.
Trait Implementations§
source§impl<Block: BlockT, ExtraArgs: Send, IDPS: InherentDataProvider> CreateInherentDataProviders<Block, ExtraArgs> for Box<dyn CreateInherentDataProviders<Block, ExtraArgs, InherentDataProviders = IDPS>>
impl<Block: BlockT, ExtraArgs: Send, IDPS: InherentDataProvider> CreateInherentDataProviders<Block, ExtraArgs> for Box<dyn CreateInherentDataProviders<Block, ExtraArgs, InherentDataProviders = IDPS>>
§type InherentDataProviders = IDPS
type InherentDataProviders = IDPS
The inherent data providers that will be created.
source§fn create_inherent_data_providers<'life0, 'async_trait>(
&'life0 self,
parent: Block::Hash,
extra_args: ExtraArgs
) -> Pin<Box<dyn Future<Output = Result<Self::InherentDataProviders, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_inherent_data_providers<'life0, 'async_trait>(
&'life0 self,
parent: Block::Hash,
extra_args: ExtraArgs
) -> Pin<Box<dyn Future<Output = Result<Self::InherentDataProviders, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create the inherent data providers at the given
parent
block using the given extra_args
.