Skip to main content

Crate mkutils_macros

Crate mkutils_macros 

Source

Attribute Macros§

context

Derive Macros§

Default
Implements Default for a struct, using Default::default() for each field unless a #[default(...)] attribute provides a custom expression.
FromChain
Implement ::std::convert::From through a chain of intermediate types.
Inner
Adds an inner() method that returns a copy of the wrapped type.
SaturatingAdd
Implements num::traits::SaturatingAdd for a struct by delegating to each field.
SaturatingSub
Implements num::traits::SaturatingSub for a struct by delegating to each field.
SetVariant
Adds set_*() methods for each unit variant on the given enum.
Toggle
Adds a toggled() method that maps each enum variant to the next unit variant.
TypeAssoc
Implements traits that only have associated types.