Trait sc_chain_spec::Fork

source ·
pub trait Fork: Serialize + DeserializeOwned + Clone + Sized {
    type Base: Group<Fork = Self>;

    // Required methods
    fn combine_with(&mut self, other: Self);
    fn to_base(self) -> Option<Self::Base>;
}
Expand description

A ChainSpec extension fork definition.

Basically should look the same as Group, but all parameters are optional. This allows changing only one parameter as part of the fork. The forks can be combined (summed up) to specify a complete set of parameters

Required Associated Types§

source

type Base: Group<Fork = Self>

A base Group type.

Required Methods§

source

fn combine_with(&mut self, other: Self)

Combine with another struct.

All parameters set in other should override the ones in the current struct.

source

fn to_base(self) -> Option<Self::Base>

Attempt to convert to the base type if all parameters are set.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Fork for u8

§

type Base = u8

source§

fn combine_with(&mut self, other: Self)

source§

fn to_base(self) -> Option<Self::Base>

source§

impl Fork for u16

§

type Base = u16

source§

fn combine_with(&mut self, other: Self)

source§

fn to_base(self) -> Option<Self::Base>

source§

impl Fork for u32

§

type Base = u32

source§

fn combine_with(&mut self, other: Self)

source§

fn to_base(self) -> Option<Self::Base>

source§

impl Fork for u64

§

type Base = u64

source§

fn combine_with(&mut self, other: Self)

source§

fn to_base(self) -> Option<Self::Base>

source§

impl Fork for ()

§

type Base = ()

source§

fn combine_with(&mut self, other: Self)

source§

fn to_base(self) -> Option<Self::Base>

source§

impl Fork for usize

§

type Base = usize

source§

fn combine_with(&mut self, other: Self)

source§

fn to_base(self) -> Option<Self::Base>

source§

impl Fork for String

§

type Base = String

source§

fn combine_with(&mut self, other: Self)

source§

fn to_base(self) -> Option<Self::Base>

source§

impl Fork for Vec<u8>

§

type Base = Vec<u8>

source§

fn combine_with(&mut self, other: Self)

source§

fn to_base(self) -> Option<Self::Base>

source§

impl<T: Fork> Fork for Option<T>

§

type Base = Option<<T as Fork>::Base>

source§

fn combine_with(&mut self, other: Self)

source§

fn to_base(self) -> Option<Self::Base>

Implementors§