pub struct StartElementBuilder<'a> { /* private fields */ }
Expand description

A builder for a starting element event.

Implementations

Sets an attribute value of this element to the given string.

This method can be used to add attributes to the starting element. Name is a qualified name; its namespace is ignored, but its prefix is checked for correctness, that is, it is checked that the prefix is bound to some namespace in the current context.

Currently attributes are not checked for duplicates. Note that duplicate attributes are a violation of XML document well-formedness.

The writer checks that you don’t specify reserved prefix names, for example xmlns.

Adds a namespace to the current namespace context.

If no namespace URI was bound to the provided prefix at this point of the document, then the mapping from the prefix to the provided namespace URI will be written as a part of this element attribute set.

If the same namespace URI was bound to the provided prefix at this point of the document, then no namespace attributes will be emitted.

If some other namespace URI was bound to the provided prefix at this point of the document, then another binding will be added as a part of this element attribute set, shadowing the outer binding.

Adds a default namespace mapping to the current namespace context.

Same rules as for ns() are also valid for the default namespace mapping.

Trait Implementations

Performs the conversion.

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.