Trait dyn_any::UpcastFrom

source ·
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§

source

fn up_from(value: &T) -> &Self

source

fn up_from_mut(value: &mut T) -> &mut Self

source

fn up_from_box(value: Box<T>) -> Box<Self>

Implementors§

source§

impl<'a, T: DynAny<'a> + 'a> UpcastFrom<T> for dyn DynAny<'a> + 'a