Module type_dispatch::derive
source · Expand description
Utilities for writing derive macros that dispatch a method call to fields in the struct.
Structs§
- A receiver for parsing derive macro inputs.
- Configuration for deriving a trait.
- Tokens used for generating struct fields in derived implementations.
Functions§
- Add a bound
T: trait_
to every type parameter T. - Derives a trait using the given configuration and input.
- Returns a
FieldTokens
object for a struct that can be referenced withself
. - Returns a
FieldTokens
object for a struct that can be referenced using the tokens inreferent
. - Formats the contents of a struct body in the appropriate style.
- Generates a
syn::Ident
for a destructuring an element of a tuple.