Skip to main content

Module xml

Module xml 

Source
Available on crate feature xml only.
Expand description

Automatic XML (de)serialization support.

See Xml for details.

§Enabling

This module is only available when the xml feature is enabled. Enable it in Cargo.toml as follows:

[dependencies.rocket]
version = "=0.6.0-rc.1"
features = ["xml"]

§Testing

The LocalRequest and LocalResponse types provide xml() and into_xml() methods to create a request with serialized XML and deserialize a response as XML, respectively.

Structs§

Xml
The XML guard: easily consume and return XML.

Enums§

Error
Error returned by the Xml guard when XML deserialization fails.

Functions§

from_str
Deserialize an instance of type T from a string of XML text.
to_string
Serialize a T into a XML string with compact representation.