Enum rxml::Item

source ·
pub enum Item<'x> {
    XmlDeclaration(XmlVersion),
    ElementHeadStart(Option<RcPtr<CData>>, &'x NcNameStr),
    Attribute(Option<RcPtr<CData>>, &'x NcNameStr, &'x CDataStr),
    ElementHeadEnd,
    Text(&'x CDataStr),
    ElementFoot,
}
Expand description

An encodable item.

This is separate from ResolvedEvent, because events are owned, while items can be borrowed to improve efficiency (as a copy will have to take place anyway).

Variants§

§

XmlDeclaration(XmlVersion)

XML declaration

§

ElementHeadStart(Option<RcPtr<CData>>, &'x NcNameStr)

Tuple Fields

§0: Option<RcPtr<CData>>

Namespace URI or None, for unnamespaced elements

§1: &'x NcNameStr

Local name of the attribute

Start of an element header

§

Attribute(Option<RcPtr<CData>>, &'x NcNameStr, &'x CDataStr)

Tuple Fields

§0: Option<RcPtr<CData>>

Namespace URI or None, for unnamespaced attributes

§1: &'x NcNameStr

Local name of the attribute

§2: &'x CDataStr

Value of the attribute

An attribute key/value pair

§

ElementHeadEnd

End of an element header

§

Text(&'x CDataStr)

A piece of text (in element content, not attributes)

§

ElementFoot

Footer of an element

This can be used either in places where Text could be used to close the most recently opened unclosed element, or it can be used instead of ElementHeadEnd to close the element using />, without any child content.

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.