pub enum EventInto<'src> {
StartElement {
name: Cow<'src, str>,
},
EndElement {
name: Cow<'src, str>,
},
Text(Cow<'src, str>),
CData(Cow<'src, str>),
Comment(Cow<'src, str>),
Pi {
target: Cow<'src, str>,
content: Cow<'src, str>,
},
EntityRef {
name: Cow<'src, str>,
},
Eof,
}Expand description
A streaming XML event with attributes already parsed into a caller-owned buffer.
Returned by XmlReader::next_into. The buffer the caller passes is
cleared on each call and filled with the start tag’s attributes, allowing
buffer reuse across many events. For lazy attribute access without a
buffer see XmlReader::next which returns Event.
Variants§
StartElement
An opening (or empty-element) start tag. Attributes are in the
caller-owned buffer passed to XmlReader::next_into.
EndElement
A closing tag. Emitted once for each StartElement, including for
empty elements.
Text(Cow<'src, str>)
CData(Cow<'src, str>)
Comment(Cow<'src, str>)
Pi
EntityRef
An unresolved entity reference (&name;) — emitted only when
ParseOptions::resolve_entities is false.
Eof
Trait Implementations§
Auto Trait Implementations§
impl<'src> Freeze for EventInto<'src>
impl<'src> RefUnwindSafe for EventInto<'src>
impl<'src> Send for EventInto<'src>
impl<'src> Sync for EventInto<'src>
impl<'src> Unpin for EventInto<'src>
impl<'src> UnsafeUnpin for EventInto<'src>
impl<'src> UnwindSafe for EventInto<'src>
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