pub struct TraitDef<'tcx> {
pub unsafety: Unsafety,
pub generics: Generics<'tcx>,
pub bounds: ParamBounds<'tcx>,
pub trait_ref: Rc<TraitRef<'tcx>>,
pub associated_type_names: Vec<Name>,
}
As TypeScheme
but for a trait ref.
Fields
unsafety | |
generics | Generic type definitions. Note that Self is listed in here
as having a single bound, the trait itself (e.g., in the trait
Eq , there is a single bound Self : Eq ). This is so that
default methods get to assume that the Self parameters
implements the trait.
|
bounds | |
trait_ref | |
associated_type_names | A list of the associated types defined in this trait. Useful
for resolving X::Foo type markers.
|
Trait Implementations
impl<'tcx> Repr<'tcx> for TraitDef<'tcx>
Keyboard shortcuts
- ?
- Show this help dialog
- S
- Focus the search field
- ⇤
- Move up in search results
- ⇥
- Move down in search results
- ⏎
- Go to active search result
Search tricks
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
, enum
,
trait
, typedef
(or
tdef
).