Struct serde_xml_any::EventReader [−][src]
pub struct EventReader<R> where
R: Read, { /* fields omitted */ }
A wrapper around an std::io::Read
instance which provides pull-based XML parsing.
Methods
impl<R> EventReader<R> where
R: Read,
[src]
impl<R> EventReader<R> where
R: Read,
pub fn new(source: R) -> EventReader<R>
[src]
pub fn new(source: R) -> EventReader<R>
Creates a new reader, consuming the given stream.
pub fn new_with_config(source: R, config: ParserConfig) -> EventReader<R>
[src]
pub fn new_with_config(source: R, config: ParserConfig) -> EventReader<R>
Creates a new reader with the provded configuration, consuming the given stream.
pub fn next(&mut self) -> Result<XmlEvent, Error>
[src]
pub fn next(&mut self) -> Result<XmlEvent, Error>
Pulls and returns next XML event from the stream.
If returned event is XmlEvent::Error
or XmlEvent::EndDocument
, then
further calls to this method will return this event again.
ⓘImportant traits for &'a mut Rpub fn source(&self) -> &R
[src]
pub fn source(&self) -> &R
ⓘImportant traits for &'a mut Rpub fn source_mut(&mut self) -> &mut R
[src]
pub fn source_mut(&mut self) -> &mut R
pub fn into_inner(self) -> R
[src]
pub fn into_inner(self) -> R
Unwraps this EventReader
, returning the underlying reader.
Note that this operation is destructive; unwrapping the reader and wrapping it
again with EventReader::new()
will create a fresh reader which will attempt
to parse an XML document from the beginning.
impl<'r> EventReader<&'r [u8]>
[src]
impl<'r> EventReader<&'r [u8]>
pub fn from_str(source: &'r str) -> EventReader<&'r [u8]>
[src]
pub fn from_str(source: &'r str) -> EventReader<&'r [u8]>
A convenience method to create an XmlReader
from a string slice.
Trait Implementations
impl<B> Position for EventReader<B> where
B: Read,
[src]
impl<B> Position for EventReader<B> where
B: Read,
fn position(&self) -> TextPosition
[src]
fn position(&self) -> TextPosition
Returns the position of the last event produced by the reader.
impl<R> IntoIterator for EventReader<R> where
R: Read,
[src]
impl<R> IntoIterator for EventReader<R> where
R: Read,
Auto Trait Implementations
impl<R> Send for EventReader<R> where
R: Send,
impl<R> Send for EventReader<R> where
R: Send,
impl<R> Sync for EventReader<R> where
R: Sync,
impl<R> Sync for EventReader<R> where
R: Sync,