Expand description
§XMLity - Powerful XML (de)serialization for Rust
XMLity is a (de)serialization library for XML in Rust designed to allow for practically any kind of XML structure to be (de)serialized.
Currently, XMLity does not currently optimize for ergonomics, which means that it is quite verbose to use. However, it is designed to be easy to use and extend.
The most important types in XMLity are:
Serialize
,SerializeAttribute
andDeserialize
which lets you define how to (de)serialize types,Serializer
andDeserializer
which lets you define readers and writers for XML documents.SerializationGroup
andDeserializationGroup
which lets you define how to (de)serialize groups of types that can be extended upon in other elements/groups recursively.XmlValue
and its variants which allow for generic deserialization of XML documents, similar to [serde_json::Value
].
The library includes derive macros for Serialize
, SerializeAttribute
, Deserialize
, SerializationGroup
and DeserializationGroup
which can be enabled with the derive
feature. The macros can be used to create nearly any kind of XML structure you want. If there is something it cannot do, please open an issue or a pull request.
The macro xml
can be used to create XmlValues
in a more ergonomic way. It is also possible to create XmlValues
manually, but it is quite verbose.
Re-exports§
pub use de::DeserializationGroup;
pub use de::Deserialize;
pub use de::DeserializeOwned;
pub use de::Deserializer;
pub use ser::AttributeSerializer;
pub use ser::SerializationGroup;
pub use ser::Serialize;
pub use ser::SerializeAttribute;
pub use ser::Serializer;
pub use value::XmlValue;
Modules§
- de
- This module contains the
Deserialize
,Deserializer
andDeserializationGroup
traits and associated types. - ser
- This module contains the
Serialize
,SerializeAttribute
,Serializer
andSerializationGroup
traits and associated types. - types
- This module contains implementations for common types including primitives, iterators, and common collections, as well as some utility types.
- value
- This module contains the
XmlValue
type, which is a type which can be serialized or deserialized as XML, and a type which other types can deserialize from/serialize into.
Macros§
- xml
- Construct an
XmlValue
from an XML-like literal.
Structs§
- Expanded
Name - XML Expanded Name
- Local
Name - XML Local Name
- Prefix
- XML Prefix
- QName
- XML Qualified Name
- XmlNamespace
- XML Namespace
Enums§
- Invalid
XmlName Error - An error that occurs when a name is invalid.
- Local
Name Parse Error - An error that can occur when parsing a
LocalName
. - Prefix
Parse Error - An error that can occur when parsing a
Prefix
. - QName
Parse Error - An error that can occur when parsing a
QName
. - XmlNamespace
Parse Error - An error that can occur when parsing a
XmlNamespace
.