[][src]Trait rustc_data_structures::owning_ref::IntoErased

pub unsafe trait IntoErased<'a> {
    type Erased;
    fn into_erased(self) -> Self::Erased;
}
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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.

Associated Types

type Erased

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Owner with the dereference type substituted to Erased.

Loading content...

Required methods

fn into_erased(self) -> Self::Erased

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Performs the type erasure.

Loading content...

Implementations on Foreign Types

impl<'a, T: 'a> IntoErased<'a> for Box<T>[src]

type Erased = Box<dyn Erased + 'a>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<'a, T: 'a> IntoErased<'a> for Arc<T>[src]

type Erased = Arc<dyn Erased + 'a>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Loading content...

Implementors

impl<'a, T: 'a> IntoErased<'a> for Rc<T>[src]

type Erased = Rc<dyn Erased + 'a>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Loading content...