pub unsafe trait IntoErased<'a> {
    type Erased;

    // Required method
    fn into_erased(self) -> Self::Erased;
}
Expand description

Helper trait for erasing the concrete type of what an owner dereferences to, for example Box<T> -> Box<Erased>. This would be unneeded with higher kinded types support in the language.

Required Associated Types§

source

type Erased

Owner with the dereference type substituted to Erased.

Required Methods§

source

fn into_erased(self) -> Self::Erased

Performs the type erasure.

Implementations on Foreign Types§

source§

impl<'a, T: 'a> IntoErased<'a> for Arc<T>

§

type Erased = Arc<dyn Erased + 'a>

source§

fn into_erased(self) -> Self::Erased

source§

impl<'a, T: 'a> IntoErased<'a> for Box<T>

§

type Erased = Box<dyn Erased + 'a, Global>

source§

fn into_erased(self) -> Self::Erased

Implementors§

source§

impl<'a, T: 'a> IntoErased<'a> for Rc<T>

§

type Erased = Rc<dyn Erased + 'a>