Trait sp_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.

Implementors§

source§

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

§

type Outcome = <N as TypedGet>::Type

source§

impl<T> Morph<T> for Identity

A structure that performs identity conversion.

§

type Outcome = T

source§

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

§

type Outcome = <V as TypedGet>::Type