Trait BlockAssembler

Source
pub trait BlockAssembler<F: BlockExecutorFactory> {
    type Block: Block;

    // Required method
    fn assemble_block(
        &self,
        input: BlockAssemblerInput<'_, '_, F, <Self::Block as Block>::Header>,
    ) -> Result<Self::Block, BlockExecutionError>;
}
Expand description

A type that knows how to assemble a block.

Required Associated Types§

Source

type Block: Block

The block type produced by the assembler.

Required Methods§

Source

fn assemble_block( &self, input: BlockAssemblerInput<'_, '_, F, <Self::Block as Block>::Header>, ) -> Result<Self::Block, BlockExecutionError>

Builds a block. see BlockAssemblerInput documentation for more details.

Implementations on Foreign Types§

Source§

impl<'a, F: BlockExecutorFactory, T: 'a + BlockAssembler<F> + ?Sized> BlockAssembler<F> for &'a T

Source§

type Block = <T as BlockAssembler<F>>::Block

Source§

fn assemble_block( &self, input: BlockAssemblerInput<'_, '_, F, <Self::Block as Block>::Header>, ) -> Result<Self::Block, BlockExecutionError>

Source§

impl<F: BlockExecutorFactory, T: BlockAssembler<F> + ?Sized> BlockAssembler<F> for Arc<T>

Source§

type Block = <T as BlockAssembler<F>>::Block

Source§

fn assemble_block( &self, input: BlockAssemblerInput<'_, '_, F, <Self::Block as Block>::Header>, ) -> Result<Self::Block, BlockExecutionError>

Implementors§