#[derive(FromArma)]
{
// Attributes available to this derive:
#[arma]
}
Expand description
Derive implementation of FromArma, only supports structs.
- Map structs are converted from an hashmap.
- Tuple structs are converted from an array.
- Newtype structs directly use’s the value’s
FromArmaimplementation. - Unit-like structs are not supported.
§Container Attributes
#[arma(transparent)]: treat single field map structs as if its a newtype structs.#[arma(default)]: any missing field will be filled by the structsDefaultimplementation.
§Field Attributes
#[arma(from_str)]: use the typesstd::str::FromStrinstead ofFromArma.#[arma(default)]: if missing use itsDefaultimplementation (takes precedence over container).