[][src]Struct rustc::ty::ExistentialTraitRef

pub struct ExistentialTraitRef<'tcx> {
    pub def_id: DefId,
    pub substs: SubstsRef<'tcx>,
}
⚙️ 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.

An existential reference to a trait, where Self is erased. For example, the trait object Trait<'a, 'b, X, Y> is:

exists T. T: Trait<'a, 'b, X, Y>

The substitutions don't include the erased Self, only trait type and lifetime parameters ([X, Y] and ['a, 'b] above).

Fields

def_id: DefId
⚙️ 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.

substs: SubstsRef<'tcx>
⚙️ 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.

Methods

impl<'tcx> ExistentialTraitRef<'tcx>[src]

pub fn input_types<'b>(
    &'b self
) -> impl DoubleEndedIterator<Item = Ty<'tcx>> + 'b
[src]

⚙️ 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.

pub fn erase_self_ty(
    tcx: TyCtxt<'tcx>,
    trait_ref: TraitRef<'tcx>
) -> ExistentialTraitRef<'tcx>
[src]

⚙️ 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.

pub fn with_self_ty(
    &self,
    tcx: TyCtxt<'tcx>,
    self_ty: Ty<'tcx>
) -> TraitRef<'tcx>
[src]

⚙️ 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.

Object types don't have a self type specified. Therefore, when we convert the principal trait-ref into a normal trait-ref, you must give some self type. A common choice is mk_err() or some placeholder type.

Trait Implementations

impl<'tcx> Clone for ExistentialTraitRef<'tcx>[src]

impl<'tcx> Copy for ExistentialTraitRef<'tcx>[src]

impl<'tcx> Debug for ExistentialTraitRef<'tcx>[src]

impl<'tcx> Decodable for ExistentialTraitRef<'tcx>[src]

impl<'tcx> Display for ExistentialTraitRef<'tcx>[src]

impl<'tcx> Encodable for ExistentialTraitRef<'tcx>[src]

impl<'tcx> Eq for ExistentialTraitRef<'tcx>[src]

impl<'tcx> Hash for ExistentialTraitRef<'tcx>[src]

impl<'tcx, '__ctx> HashStable<StableHashingContext<'__ctx>> for ExistentialTraitRef<'tcx>[src]

impl<'a, 'tcx> Lift<'tcx> for ExistentialTraitRef<'a>[src]

type Lifted = ExistentialTraitRef<'tcx>

⚙️ 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<'tcx> Ord for ExistentialTraitRef<'tcx>[src]

impl<'tcx> PartialEq<ExistentialTraitRef<'tcx>> for ExistentialTraitRef<'tcx>[src]

impl<'tcx> PartialOrd<ExistentialTraitRef<'tcx>> for ExistentialTraitRef<'tcx>[src]

impl<'tcx, P: PrettyPrinter<'tcx>> Print<'tcx, P> for ExistentialTraitRef<'tcx>[src]

type Output = P

⚙️ 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.

type Error = Error

⚙️ 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<'tcx> Relate<'tcx> for ExistentialTraitRef<'tcx>[src]

impl<'tcx> StructuralEq for ExistentialTraitRef<'tcx>[src]

impl<'tcx> StructuralPartialEq for ExistentialTraitRef<'tcx>[src]

impl<'tcx> TypeFoldable<'tcx> for ExistentialTraitRef<'tcx>[src]

Auto Trait Implementations

impl<'tcx> !RefUnwindSafe for ExistentialTraitRef<'tcx>

impl<'tcx> !Send for ExistentialTraitRef<'tcx>

impl<'tcx> !Sync for ExistentialTraitRef<'tcx>

impl<'tcx> Unpin for ExistentialTraitRef<'tcx>

impl<'tcx> !UnwindSafe for ExistentialTraitRef<'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ArenaAllocatable for T where
    T: Copy
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

impl<T> Decodable for T where
    T: UseSpecializedDecodable
[src]

impl<T> Encodable for T where
    T: UseSpecializedEncodable + ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

⚙️ 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<E> SpecializationError for E[src]

impl<'tcx, T> Subst<'tcx> for T where
    T: TypeFoldable<'tcx>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.