Expand description
Derive xml-data trait implementations
Deriving supports the following attributes on the struct:
#[xml_data(tag("..."))]: XML tag (only for derivingElement); defaults to struct name#[xml_data(crate(...))]: Name ofxml-datacrate in local scope; defaults toxml_data#[xml_data(ignore_unknown)]: Ignore unhandled/unknown attributes, inner nodes and inner text (only for derivingElement;Innernever fails for unknown data)
And the following attributes on struct fields:
#[xml(attr)]: Mark field as attribute for containing XML element (only for derivingElement`)#[xml(attr("..."))]: Mark field as attribute for containing XML element with given key (only for derivingElement`)#[xml(attr_string)]: Mark field as string attribute (usingValueStringinstead ofValueDefault) for containing XML element (only for derivingElement`)
Multiple attributes can be combined like #[xml(tag("..."), ignore_unknown)].
Derive Macrosยง
- Element
- Derive
xml-data::{parser,serializer}::Element - Inner
- Derive
xml-data::{parser,serializer}::Inner - Parser
Element - Derive
xml-data::parser::Element - Parser
Inner - Derive
xml-data::parser::Inner - Serializer
Element - Derive
xml-data::serializer::Element - Serializer
Inner - Derive
xml-data::serializer::Inner