pub struct XmlConfig { /* private fields */ }
Expand description

XmlBuilder configuration options

Implementations

Initialze a new XmlConfig instance.

This uses the builder pattern. All options are initialized to None and can be set using selfs methods. Any options not set will use their defaults upon call to finalize.

Root key name to contain produced JSON object.

When this is set to its default value “root”, the output will not be wrapped in root_name’s value. This is to conform to match the behavior of node-xml2js.

("root" by default)

Attribute key

The value of the JSON key used to store XML attributes under.

("$" by default)

Char data key

The value of the JSON key used to store XML character data under.

("_" by default)

XML Declaration

(Declaration::default() by default) Declaration::default(): Declaration::default

Rendering indentation options

(None by default)

Finalize configuration options and build an XmlBuilder instance

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.