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§
Sourcefn ty_with_args(&self, args: &GenericArgs) -> Ty
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.