pub unsafe trait IntoErasedSendSync<'a> {
    type Erased: Send + Sync;

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

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

Required Associated Types§

source

type Erased: Send + Sync

Owner with the dereference type substituted to Erased + Send + Sync.

Required Methods§

source

fn into_erased_send_sync(self) -> Self::Erased

Performs the type erasure.

Implementations on Foreign Types§

source§

impl<'a, T: Send + 'a> IntoErasedSendSync<'a> for Box<T>

§

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

source§

fn into_erased_send_sync(self) -> Self::Erased

source§

impl<'a, T: Send + Sync + 'a> IntoErasedSendSync<'a> for Arc<T>

§

type Erased = Arc<dyn Erased + Send + Sync + 'a>

source§

fn into_erased_send_sync(self) -> Self::Erased

Implementors§