pub enum Event {
StartDocument,
EndDocument,
StartTag {
name: InternedStr,
attributes: Vec<Attribute>,
},
EndTag {
name: InternedStr,
},
Text(String),
CdataSection(String),
Comment(String),
ProcessingInstruction(String),
EntityReference(String),
IgnorableWhitespace(String),
DocDecl(String),
}Expand description
A parse event, one per token in the document.
The parsers produce events, and AbxWriter encodes them.
The variants follow the token types of Java’s XmlPullParser.
Variants§
StartDocument
Start of the document.
EndDocument
End of the document.
StartTag
An opening tag with its attributes.
Fields
§
name: InternedStrThe element’s tag name.
EndTag
A closing tag.
Fields
§
name: InternedStrThe element’s tag name, matching the corresponding Event::StartTag.
Text(String)
Character data, not escaped.
CdataSection(String)
The content of a <![CDATA[...]]> section.
Comment(String)
The content of a <!--...--> comment.
ProcessingInstruction(String)
The content of a <?...?> processing instruction.
EntityReference(String)
An entity reference by name: "amp" for &, not the resolved &.
IgnorableWhitespace(String)
Whitespace marked as ignorable.
DocDecl(String)
The content of a <!DOCTYPE ...> declaration.
Trait Implementations§
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more