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

Infallible 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: Into<B>, B> Convert<A, B> for ConvertInto

source§

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

source§

impl<X, Y, T: Get<Y>> Convert<X, Y> for ConvertToValue<T>