[][src]Trait substrate_service::ChainSpecExtension

pub trait ChainSpecExtension: Clone + DeserializeOwned + Serialize {
    type Forks: IsForks;
    fn get<T>(&self) -> Option<&T>
    where
        T: 'static
; fn forks<BlockNumber, T>(&self) -> Option<Forks<BlockNumber, T>>
    where
        BlockNumber: Ord + Clone + 'static,
        T: Group + 'static,
        <Self::Forks as IsForks>::Extension: Extension,
        <<Self::Forks as IsForks>::Extension as Group>::Fork: Extension
, { ... } }

A collection of ChainSpec extensions.

This type can be passed around and allows the core modules to request a strongly-typed, but optional configuration.

Associated Types

type Forks: IsForks

Loading content...

Required methods

fn get<T>(&self) -> Option<&T> where
    T: 'static, 

Get an extension of specific type.

Loading content...

Provided methods

fn forks<BlockNumber, T>(&self) -> Option<Forks<BlockNumber, T>> where
    BlockNumber: Ord + Clone + 'static,
    T: Group + 'static,
    <Self::Forks as IsForks>::Extension: Extension,
    <<Self::Forks as IsForks>::Extension as Group>::Fork: Extension

Get forkable extensions of specific type.

Loading content...

Implementations on Foreign Types

impl<B, E> Extension for Forks<B, E> where
    B: Serialize + DeserializeOwned + Ord + Clone + 'static,
    E: Extension + Group + 'static, 
[src]

type Forks = Forks<B, E>

impl Extension for Option<()>[src]

type Forks = Option<()>

Loading content...

Implementors

Loading content...