pub struct Parser<R: Read> { /* private fields */ }
Expand description
A low level XML parser that emits Event
s as it reads the incoming XML.
Implementations§
Source§impl<R: Read> Parser<R>
impl<R: Read> Parser<R>
Sourcepub fn peek(&mut self) -> Result<Event<'_>, ParseError>
pub fn peek(&mut self) -> Result<Event<'_>, ParseError>
Peek the next Event
Sourcepub fn next(&mut self) -> Result<Event<'_>, ParseError>
pub fn next(&mut self) -> Result<Event<'_>, ParseError>
Retrieve next Event
Sourcepub fn finish_tag(&mut self, depth: usize) -> Result<(), ParseError>
pub fn finish_tag(&mut self, depth: usize) -> Result<(), ParseError>
Consume events until we leave given depth
of tags. All attributes and nested tags are
ignored.
With depth = 0, it does nothing. With depth = 1, it finishes the current tag. With depth = 2, it finishes the current tag and its parent. …
Auto Trait Implementations§
impl<R> Freeze for Parser<R>where
R: Freeze,
impl<R> RefUnwindSafe for Parser<R>where
R: RefUnwindSafe,
impl<R> Send for Parser<R>where
R: Send,
impl<R> Sync for Parser<R>where
R: Sync,
impl<R> Unpin for Parser<R>where
R: Unpin,
impl<R> UnwindSafe for Parser<R>where
R: UnwindSafe,
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