sc_chain_spec

Trait 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

source§

type Base = u8

source§

fn combine_with(&mut self, other: Self)

source§

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

source§

impl Fork for u16

source§

type Base = u16

source§

fn combine_with(&mut self, other: Self)

source§

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

source§

impl Fork for u32

source§

type Base = u32

source§

fn combine_with(&mut self, other: Self)

source§

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

source§

impl Fork for u64

source§

type Base = u64

source§

fn combine_with(&mut self, other: Self)

source§

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

source§

impl Fork for ()

source§

type Base = ()

source§

fn combine_with(&mut self, other: Self)

source§

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

source§

impl Fork for usize

source§

type Base = usize

source§

fn combine_with(&mut self, other: Self)

source§

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

source§

impl Fork for String

source§

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>

source§

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>

source§

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

source§

fn combine_with(&mut self, other: Self)

source§

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

Implementors§