Trait rustc_ap_rustc_data_structures::owning_ref::IntoErasedSendSync[][src]

pub unsafe trait IntoErasedSendSync<'a> {
    type Erased: Send + Sync;
    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.

Associated Types

type Erased: Send + Sync[src]

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

Required methods

fn into_erased_send_sync(self) -> Self::Erased[src]

Performs the type erasure.

Implementations on Foreign Types

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

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

fn into_erased_send_sync(self) -> Self::Erased[src]

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

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

fn into_erased_send_sync(self) -> Self::Erased[src]

Implementors