Skip to main content

ExtensionsFactory

Trait ExtensionsFactory 

Source
pub trait ExtensionsFactory<Block: BlockT>: Send + Sync {
    // Required method
    fn extensions_for(
        &self,
        block_hash: Block::Hash,
        block_number: NumberFor<Block>,
    ) -> Extensions;
}
Expand description

Generate the starting set of Extensions.

These Extensions are passed to the environment a runtime is executed in.

Required Methods§

Source

fn extensions_for( &self, block_hash: Block::Hash, block_number: NumberFor<Block>, ) -> Extensions

Create Extensions for the given input.

  • block_hash: The hash of the block in the context that extensions will be used.
  • block_number: The number of the block in the context that extensions will be used.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<Block: BlockT, T: ExtensionsFactory<Block>> ExtensionsFactory<Block> for Vec<T>

Source§

fn extensions_for( &self, block_hash: Block::Hash, block_number: NumberFor<Block>, ) -> Extensions

Source§

impl<Block: BlockT> ExtensionsFactory<Block> for ()

Source§

fn extensions_for(&self, _: Block::Hash, _: NumberFor<Block>) -> Extensions

Implementors§

Source§

impl<Block: BlockT, Ext: Default + Extension> ExtensionsFactory<Block> for ExtensionBeforeBlock<Block, Ext>