Expand description
Concise, declarative trait implementation macros.
§#[no_std]
Where possible, these macros emit #[no_std]-compatible code.
Macros§
- forward_
deref_ and_ mut - Implements
DerefandDerefMutby forwarding through an inner field’s implementation. - forward_
display - Implements
Displayfor structs by forwarding to one of its field. - forward_
error - Implements
Errorfor structs and forwards thesourceimplementation to one of its fields. - impl_
as_ mut - Implement
AsMutfor a struct. - impl_
as_ ref - Implement
AsReffor a struct. - impl_
deref - Implement
Dereffor a struct. - impl_
deref_ and_ mut - Implements
DerefandDerefMutby forwarding through an inner field’s implementation. - impl_
deref_ mut - Implement
DerefMutfor a struct. - impl_
display - Implements
Displayfor structs using aformat!-like string constructor. - impl_
display_ enum - Implements
Displayfor enums using a static string or format args for each variant. - impl_
error_ enum - Implements
Errorfor enums. - impl_
from - Implement
Fromfor a struct. - impl_
from_ for_ primitive - Implement
Fromfor a primitive. - impl_
into - Implement
Intofor a struct.