Struct xml_builder::XMLElement[][src]

pub struct XMLElement { /* fields omitted */ }
Expand description

Structure representing an XML element field.

Implementations

Instantiates a XMLElement object.

Arguments

  • name - A string slice that holds the name of the XML element.

Adds the given name/value attribute to the XMLElement.

Arguments

  • name - A string slice that holds the name of the attribute
  • value - A string slice that holds the value of the attribute

Adds a new XMLElement child object to the references XMLElement. Raises a XMLError if trying to add a child to a text XMLElement.

Arguments

  • element - A XMLElement object to add as child

Adds text content to a XMLElement object. Raises a XMLError if trying to add text to a non-empty object.

Arguments

  • text - A string containing the text to add to the object

Renders an XMLElement object into the specified writer implementing Write trait. Does not take ownership of the object.

Arguments

  • writer - An object to render the referenced XMLElement to

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

Performs the conversion.

Performs the conversion.

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.