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
Start of an element header
Attribute(Option<RcPtr<CData>>, &'x NcNameStr, &'x CDataStr)
Tuple Fields
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.