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§

fn convert(a: A) -> B

Make conversion.

Object Safety§

This trait is not object safe.

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 ConvertInto
where A: Into<B>,

§

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

§

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