Expand description
Concise, declarative trait implementation macros.
§#[no_std]
Where possible, these macros emit #[no_std]
-compatible code.
Macros§
- forward_
deref_ and_ mut - Implements
Deref
andDerefMut
by forwarding through an inner field’s implementation. - forward_
display - Implements
Display
for structs by forwarding to one of its field. - forward_
error - Implements
Error
for structs and forwards thesource
implementation to one of its fields. - impl_
as_ mut - Implement
AsMut
for a struct. - impl_
as_ ref - Implement
AsRef
for a struct. - impl_
deref - Implement
Deref
for a struct. - impl_
deref_ and_ mut - Implements
Deref
andDerefMut
by forwarding through an inner field’s implementation. - impl_
deref_ mut - Implement
DerefMut
for a struct. - impl_
display - Implements
Display
for structs using aformat!
-like string constructor. - impl_
display_ enum - Implements
Display
for enums using a static string or format args for each variant. - impl_
error_ enum - Implements
Error
for enums. - impl_
from - Implement
From
for a struct. - impl_
from_ for_ primitive - Implement
From
for a primitive. - impl_
into - Implement
Into
for a struct.