pub struct TraitDef<'a> {
pub span: Span,
pub attributes: Vec<Attribute>,
pub path: Path<'a>,
pub additional_bounds: Vec<Ty<'a>>,
pub generics: LifetimeBounds<'a>,
pub methods: Vec<MethodDef<'a>>,
pub associated_types: Vec<(Ident, Ty<'a>)>,
}
Fields
span | The span for the current #[derive(Foo)] header.
|
attributes | |
path | Path of the trait, including any type parameters
|
additional_bounds | Additional bounds required of any type parameters of the type,
other than the current trait
|
generics | Any extra lifetimes and/or bounds, e.g. D: serialize::Decoder
|
methods | |
associated_types | |
Methods
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
).