pub trait Upcast<T> {
    // Required method
    fn upcast(self) -> T;
}
Expand description

Losslessly upcasts one type into another

Required Methods§

source

fn upcast(self) -> T

Implementors§

source§

impl<T, U> Upcast<T> for U
where T: UpcastFrom<U>,

Implement Upcast automatically for all types that implement UpcastFrom