pub trait UpcastFrom<T: ?Sized> {
// Required methods
fn up_from(value: &T) -> &Self;
fn up_from_mut(value: &mut T) -> &mut Self;
fn up_from_box(value: Box<T>) -> Box<Self>;
}Expand description
Implement this trait for your dyn Trait types for all T: Trait
Required Methods§
fn up_from(value: &T) -> &Self
fn up_from_mut(value: &mut T) -> &mut Self
fn up_from_box(value: Box<T>) -> Box<Self>
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.