pub enum IterEvent {
StartElement {
name: String,
attrs: Vec<(String, String)>,
path: String,
depth: usize,
},
EndElement {
name: String,
path: String,
depth: usize,
},
Text {
content: String,
path: String,
depth: usize,
},
CData {
content: String,
path: String,
depth: usize,
},
Comment {
content: String,
depth: usize,
},
Pi {
target: String,
data: String,
depth: usize,
},
}Expand description
One streamed event. Names, attribute values, and text content
are owned Strings so the iterator can yield items
independent of the reader’s source buffer lifetime.
Variants§
StartElement
Opening (or empty-element) start tag. Attributes are
pre-collected; path is the current ancestor chain
including this element.
EndElement
Closing tag — emitted once for each StartElement,
including for empty (<br/>) elements. path is the
chain up to this element (with the element itself as
the last segment).
Text
Character data between tags.
CData
CDATA section.
Comment
Comment (no payload exposed by the path — comments don’t add a path segment).
Pi
Processing instruction.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IterEvent
impl RefUnwindSafe for IterEvent
impl Send for IterEvent
impl Sync for IterEvent
impl Unpin for IterEvent
impl UnsafeUnpin for IterEvent
impl UnwindSafe for IterEvent
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