# Type Alias rustc_middle::ty::ExistentialPredicate

source ·

    pub type ExistentialPredicate<'tcx> = ExistentialPredicate<TyCtxt<'tcx>>;

## Aliased Type§

    enum ExistentialPredicate<'tcx> {
        Trait(ExistentialTraitRef<TyCtxt<'tcx>>),
        Projection(ExistentialProjection<TyCtxt<'tcx>>),
        AutoTrait(DefId),
    }

## Variants§

§

### Trait(ExistentialTraitRef<TyCtxt<'tcx>>)

E.g., `Iterator`.

§

### Projection(ExistentialProjection<TyCtxt<'tcx>>)

E.g., `Iterator::Item = T`.

§

### AutoTrait(DefId)

E.g., `Send`.

## Trait Implementations§

source§

### impl<'tcx> ExistentialPredicateStableCmpExt<'tcx> for ExistentialPredicate<'tcx>

source§

#### fn stable_cmp(&self, tcx: TyCtxt<'tcx>, other: &Self) -> Ordering

Compares via an ordering that will not change if modules are reordered or other changes are made to the tree. In particular, this ordering is preserved across incremental compilations.

source§

### impl<'tcx, P: PrettyPrinter<'tcx>> Print<'tcx, P> for ExistentialPredicate<'tcx>

source§

#### fn print(&self, cx: &mut P) -> Result<(), PrintError>

## Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain `repr(...)` attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 24 bytes

Size for each variant:

- `Trait`: 24 bytes
- `Projection`: 24 bytes
- `AutoTrait`: 12 bytes