rustc_type_ir::inherent

Trait Term

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

Provided Methods§

Source

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

Source

fn expect_ty(&self) -> I::Ty

Source

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

Source

fn expect_const(&self) -> I::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§