Trait Upcast

Source
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