Trait stable_mir::crate_def::CrateDefType

source ·
pub trait CrateDefType: CrateDef {
    // Provided methods
    fn ty(&self) -> Ty { ... }
    fn ty_with_args(&self, args: &GenericArgs) -> Ty { ... }
}
Expand description

A trait that can be used to retrieve a definition’s type.

Note that not every CrateDef has a type Ty. They should not implement this trait.

Provided Methods§

source

fn ty(&self) -> Ty

Returns the type of this crate item.

source

fn ty_with_args(&self, args: &GenericArgs) -> Ty

Retrieve the type of this definition by instantiating and normalizing it with args.

This will panic if instantiation fails.

Implementors§