XmlReaderSync

Trait XmlReaderSync 

Source
pub trait XmlReaderSync<'a>: XmlReader {
    // Required method
    fn read_event(&mut self) -> Result<Event<'a>, Error>;

    // Provided methods
    fn read_tag(&mut self) -> Result<Event<'a>, Error> { ... }
    fn skip_current(&mut self) -> Result<(), Error> { ... }
}
Expand description

Trait that defines a synchronous XML reader.

Required Methods§

Source

fn read_event(&mut self) -> Result<Event<'a>, Error>

Reads the next Event from the reader.

§Errors

Returns an Error if the event could not been read.

Provided Methods§

Source

fn read_tag(&mut self) -> Result<Event<'a>, Error>

Reads a new XML tag (Event::Start, Event::Empty or Event::End) from the reader.

§Errors

Forwards the errors from read_event.

Source

fn skip_current(&mut self) -> Result<(), Error>

Skips the current event with respect to the level of the different XML tags.

§Errors

Forwards the errors from read_event.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a> XmlReaderSync<'a> for SliceReader<'a>

Source§

impl<'a, R> XmlReaderSync<'a> for ErrorReader<R>
where R: XmlReaderSync<'a>,

Source§

impl<R> XmlReaderSync<'static> for IoReader<R>
where R: BufRead,