Skip to main content

Crate derive

Crate derive 

Source
Expand description

Component model macro support

Derive Macros§

Assign
Derives the Assign trait for struct fields, allowing each field to be set with a value that can be converted into the field’s type.
ComponentFrom
Macro to implement From for each component (field) of a structure. This macro simplifies the creation of From trait implementations for struct fields, enabling easy conversion from a struct reference to its field types.
ComponentModel
Unified derive macro that combines all component model functionality into a single annotation.
ComponentsAssign
Derives the ComponentsAssign trait for a struct, enabling components_assign which set all fields at once.
FromComponents
A procedural macro to automatically derive the From< T > trait implementation for a struct, enabling instances of one type to be converted from instances of another type.