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§

source

fn convert(a: A) -> B

Make conversion.

Implementations on Foreign Types§

source§

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

source§

fn convert(_: A) -> B

Implementors§

source§

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

source§

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