Derive Macro simics_macro::FromAttrValueList

source ·
#[derive(FromAttrValueList)]
{
    // Attributes available to this derive:
    #[attr_value]
}
Expand description

Derive Macro for implementing conversion from an AttrValue list into a struct, where each entry in the list is a struct field’s value.

§Arguments

At the field level (i.e. on each field of a struct deriving this attribute), the following attributes are supported:

  • #[attr_value(fallible)] - If the field type does not implement From<AttrValue>, use its implementation of TryFrom<AttrValue> instead. Whether this flag is necessary cannot be automatically determined by this macro, so it must be specified manually.