Predicate in rustc_type_ir::inherent - Rust
Description: API documentation for the Rust `Predicate` trait in crate `rustc_type_ir`.

Skip to main content

## Predicate

# Trait Predicate

Source

    pub trait Predicate<I: Interner<Predicate = Self>>:
        Copy
        + Debug
        + Hash
        + Eq
        + TypeSuperVisitable<I>
        + TypeSuperFoldable<I>
        + Flags
        + UpcastFrom<I, PredicateKind<I>>
        + UpcastFrom<I, Binder<I, PredicateKind<I>>>
        + UpcastFrom<I, ClauseKind<I>>
        + UpcastFrom<I, Binder<I, ClauseKind<I>>>
        + UpcastFrom<I, I::Clause>
        + UpcastFrom<I, NormalizesTo<I>>
        + UpcastFrom<I, TraitRef<I>>
        + UpcastFrom<I, Binder<I, TraitRef<I>>>
        + UpcastFrom<I, TraitPredicate<I>>
        + UpcastFrom<I, OutlivesPredicate<I, I::Ty>>
        + UpcastFrom<I, OutlivesPredicate<I, I::Region>>
        + IntoKind<Kind = Binder<I, PredicateKind<I>>>
        + Elaboratable<I> {
        // Required method
        fn as_clause(self) -> Option<I::Clause>;

        // Provided methods
        fn as_normalizes_to(self) -> Option<Binder<I, NormalizesTo<I>>> { ... }
        fn allow_normalization(self) -> bool { ... }
    }

## Required Methods§

Source

#### fn as_clause(self) -> Option<I::Clause>

## Provided Methods§

Source

#### fn as_normalizes_to(self) -> Option<Binder<I, NormalizesTo<I>>>

Source

#### fn allow_normalization(self) -> bool

## Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

## Implementors§