Crate component_model_meta

Source
Expand description

§Module :: component_model_meta

experimental rust-status docs.rs discord

A flexible implementation of the Builder pattern supporting nested builders and collection-specific subcomponent_models. Implementation of its derive macro. Should not be used independently, instead use module::component_model which relies on the module.

Not intended to be used without runtime. This module and runtime is aggregate in module::component_model is here.

§To add to your project

cargo add component_model_meta

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.
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.