rustc_middle::ty::inherent

Trait Term

source
pub trait Term<I>:
    Copy
    + Debug
    + Hash
    + Eq
    + IntoKind<Kind = TermKind<I>>
    + TypeFoldable<I>
    + Relate<I>
where I: Interner<Term = Self>,
{ // Provided methods fn as_type(&self) -> Option<<I as Interner>::Ty> { ... } fn expect_ty(&self) -> <I as Interner>::Ty { ... } fn as_const(&self) -> Option<<I as Interner>::Const> { ... } fn expect_const(&self) -> <I as Interner>::Const { ... } fn is_infer(self) -> bool { ... } fn to_alias_term(self) -> Option<AliasTerm<I>> { ... } }

Provided Methods§

source

fn as_type(&self) -> Option<<I as Interner>::Ty>

source

fn expect_ty(&self) -> <I as Interner>::Ty

source

fn as_const(&self) -> Option<<I as Interner>::Const>

source

fn expect_const(&self) -> <I as Interner>::Const

source

fn is_infer(self) -> bool

source

fn to_alias_term(self) -> Option<AliasTerm<I>>

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§

source§

impl<'tcx> Term<TyCtxt<'tcx>> for Term<'tcx>