#[derive(DeserializationGroup)]
{
// Attributes available to this derive:
#[xelement]
#[xattribute]
#[xgroup]
#[xvalue]
}
Expand description
Derives the DeserializationGroup trait for a type.
To configure the deserialization, use the #[xgroup(...)] attribute on the root of the type.
NOTE: This trait/attribute is not mutually exclusive with the [Deserialize] trait/attribute. This means that you could for example use a struct both as a sequence ([Deserialize] with no attribute) and as a group ([DeserializationGroup] with the attribute).
§Configuration
§Deserialize a part of an element - #[xgroup(...)] on the root of a type
§Root Options
| Name | Type | Description |
|---|---|---|
| attribute_order |
"strict", "loose", "none"
|
Set if the order of attributes is important when deserializing. - "strict": The attributes must come directly after each other, and this group will try to deserialize them in one go.- "loose": The order of attributes must come relative to each other, but they can be separated by other attributes outside this group.- "none" (default): The order of attributes is not important.
|
| children_order |
"strict", "loose", "none"
|
Set if the order of children is important when deserializing. - "strict": The children must come directly after each other, and this group will try to deserialize them in one go.- "loose": The order of children must come relative to each other, but they can be separated by other children outside this group.- "none" (default): The order of children is not important.
|