Trait CliNodeComponents

Source
pub trait CliNodeComponents<N: CliNodeTypes> {
    type Executor: BlockExecutorProvider<Primitives = N::Primitives>;
    type Consensus: FullConsensus<N::Primitives, Error = ConsensusError> + Clone + 'static;

    // Required methods
    fn executor(&self) -> &Self::Executor;
    fn consensus(&self) -> &Self::Consensus;
}
Expand description

Helper trait aggregating components required for the CLI.

Required Associated Types§

Source

type Executor: BlockExecutorProvider<Primitives = N::Primitives>

Block executor.

Source

type Consensus: FullConsensus<N::Primitives, Error = ConsensusError> + Clone + 'static

Consensus implementation.

Required Methods§

Source

fn executor(&self) -> &Self::Executor

Returns the block executor.

Source

fn consensus(&self) -> &Self::Consensus

Returns the consensus implementation.

Implementations on Foreign Types§

Source§

impl<N: CliNodeTypes, E, C> CliNodeComponents<N> for (E, C)
where E: BlockExecutorProvider<Primitives = N::Primitives>, C: FullConsensus<N::Primitives, Error = ConsensusError> + Clone + 'static,

Source§

type Executor = E

Source§

type Consensus = C

Source§

fn executor(&self) -> &Self::Executor

Source§

fn consensus(&self) -> &Self::Consensus

Implementors§