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§

type Outcome

The type into which A is mutated.

Required Methods§

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

Make conversion.

Object Safety§

This trait is not object safe.

Implementors§

§

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

§

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

§

type Outcome = T1

§

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

§

type Outcome = T1

§

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

§

type Outcome = T1

§

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

§

type Outcome = T1

§

impl<T> Morph<T> for Identity

A structure that performs identity conversion.

§

type Outcome = T

§

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

§

type Outcome = T

§

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

§

type Outcome = <V as TypedGet>::Type