referrerpolicy=no-referrer-when-downgrade

Trait polkadot_service::runtime_traits::Morph

source ·
pub trait Morph<A> {
    type Outcome;

    // Required method
    fn morph(a: A) -> Self::Outcome;
}
Expand description

Extensible conversion trait. Generic over only source type, with destination type being associated.

Required Associated Types§

source

type Outcome

The type into which A is mutated.

Required Methods§

source

fn morph(a: A) -> Self::Outcome

Make conversion.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<N> Morph<<N as TypedGet>::Type> for ReduceBy<N>
where N: TypedGet, <N as TypedGet>::Type: CheckedSub + Zero,

§

type Outcome = <N as TypedGet>::Type

source§

impl<T1> Morph<(T1,)> for TakeFirst

§

type Outcome = T1

source§

impl<T1, T2> Morph<(T1, T2)> for TakeFirst

§

type Outcome = T1

source§

impl<T1, T2, T3> Morph<(T1, T2, T3)> for TakeFirst

§

type Outcome = T1

source§

impl<T1, T2, T3, T4> Morph<(T1, T2, T3, T4)> for TakeFirst

§

type Outcome = T1

source§

impl<T> Morph<T> for Identity

A structure that performs identity conversion.

§

type Outcome = T

source§

impl<T, A> Morph<A> for MorphInto<T>
where A: Into<T>,

§

type Outcome = T

source§

impl<V, X> Morph<X> for Replace<V>
where V: TypedGet,

§

type Outcome = <V as TypedGet>::Type

source§

impl<V, X> Morph<X> for ReplaceWithDefault<V>
where V: Default,

§

type Outcome = V