Aggregate
Aggregate attributes of structs to be used at runtime using a simple macro.
Features
By default, all features are enabled.
-
derive
re-exportsaggregate_derive
. -
debug
implementsDebug
foraggregate_types
. -
helper
implements ease-of-life traits foraggregate_types
newtypes.
Usage
aggregate
is extremely simple to use.
In order to aggregate attributes of your struct/enum/union, simply derive it:
// The prelude is not required for derive,
// however in order to use `aggregate`,
// the trait must be in scope
use *;
/// This attribute is paired with the type
Aggregate supports nesting:
/// This attribute is paired with the type.
The #[aggregate]
attribute is not required on enum variants,
but is again required inside enum variant structs and tuples: