#[braid]Expand description
Constructs a braid
Any attributes assigned to the the struct will be applied to both the owned and borrowed types, except for doc-comments, with will only be applied to the owned form.
Available options:
ref_name = "RefName"- Sets the name of the borrowed type
ref_doc = "Alternate doc comment"- Overrides the default doc comment for the borrowed type
ref_attr = "#[derive(...)]"- Provides an attribute to be placed only on the borrowed type
owned_attr = "#[derive(...)]"- Provides an attribute to be placed only on the owned type
- either
validator [ = "Type" ]ornormalizer [ = "Type" ]- Indicates the type is validated or normalized. If not specified, it is assumed that the braid implements the relevant trait itself.
clone = "impl|omit"(default:impl)- Changes the automatic derivation of a
Cloneimplementation on the owned type.
- Changes the automatic derivation of a
debug = "impl|owned|omit"(defaultimpl)- Changes how automatic implementations of the
Debugtrait are provided. Ifowned, then the owned type will generate aDebugimplementation that will just delegate to the borrowed implementation. Ifomit, then no implementations ofDebugwill be provided.
- Changes how automatic implementations of the
display = "impl|owned|omit"(defaultimpl)- Changes how automatic implementations of the
Displaytrait are provided. Ifowned, then the owned type will generate aDisplayimplementation that will just delegate to the borrowed implementation. Ifomit, then no implementations ofDisplaywill be provided.
- Changes how automatic implementations of the
ord = "impl|owned|omit"(defaultimpl)- Changes how automatic implementations of the
PartialOrdandOrdtraits are provided. Ifowned, then the owned type will generate implementations that will just delegate to the borrowed implementations. Ifomit, then no implementations will be provided.
- Changes how automatic implementations of the
serde = "impl|omit"(defaultomit)- Adds serialize and deserialize implementations
no_expose- Functions that expose the internal field type will not be exposed publicly.
no_std- Generates
no_std-compatible braid (still requiresalloc)
- Generates