pub trait Convert<A, B> {
    // Required method
    fn convert(a: A) -> B;
}
Expand description

Extensible conversion trait. Generic over both source and destination types.

Required Methods§

fn convert(a: A) -> B

Make conversion.

Implementations on Foreign Types§

§

impl<A, B> Convert<A, B> for ()where B: Default,

§

fn convert(_: A) -> B

Implementors§

§

impl<A, B> Convert<A, B> for ConvertIntowhere B: From<A>,

§

impl<T> Convert<T, T> for Identity