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
One XmlPullParser-style parse event, as read from (or written to) an
ABX stream.
Variants§
StartDocument
The start of the document — always the first event.
EndDocument
The end of the document — always the last event.
StartTag
The opening tag of an element, with its attributes.
Fields
§
name: InternedStrThe element’s tag name.
EndTag
The closing tag of an element.
Fields
§
name: InternedStrThe element’s tag name, matching the corresponding Event::StartTag.
Text(String)
Plain character data between tags.
CdataSection(String)
A <![CDATA[...]]> section’s raw content.
Comment(String)
A <!--...--> comment’s raw content.
ProcessingInstruction(String)
A <?...?> processing instruction’s raw content.
EntityReference(String)
An entity reference’s raw name (e.g. "amp" for &), not the
resolved character — see the crate docs for why.
IgnorableWhitespace(String)
Whitespace-only character data that a validating parser would treat as ignorable.
DocDecl(String)
A <!DOCTYPE ...> declaration’s raw content.
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