Trait Upcast

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

Our version of Into. This is the trait you use in where clauses, but you typically implement UpcastFrom.

Required Methods§

Source

fn upcast(self) -> T

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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