[−][src]Struct serde_xml_rs::EventReader
A wrapper around an std::io::Read
instance which provides pull-based XML parsing.
Implementations
impl<R> EventReader<R> where
R: Read,
[src]
R: Read,
pub fn new(source: R) -> EventReader<R>
[src]
Creates a new reader, consuming the given stream.
pub fn new_with_config(source: R, config: ParserConfig) -> EventReader<R>
[src]
Creates a new reader with the provded configuration, consuming the given stream.
pub fn next(&mut self) -> Result<XmlEvent, Error>
[src]
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.
pub fn source(&self) -> &R
[src]
pub fn source_mut(&mut self) -> &mut R
[src]
pub fn into_inner(self) -> R
[src]
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]
pub fn from_str(source: &'r str) -> EventReader<&'r [u8]>
[src]
A convenience method to create an XmlReader
from a string slice.
Trait Implementations
impl<R> IntoIterator for EventReader<R> where
R: Read,
[src]
R: Read,
type Item = Result<XmlEvent, Error>
The type of the elements being iterated over.
type IntoIter = Events<R>
Which kind of iterator are we turning this into?
pub fn into_iter(self) -> Events<R>
[src]
impl<B> Position for EventReader<B> where
B: Read,
[src]
B: Read,
pub fn position(&self) -> TextPosition
[src]
Returns the position of the last event produced by the reader.
Auto Trait Implementations
impl<R> !RefUnwindSafe for EventReader<R>
[src]
impl<R> Send for EventReader<R> where
R: Send,
[src]
R: Send,
impl<R> Sync for EventReader<R> where
R: Sync,
[src]
R: Sync,
impl<R> Unpin for EventReader<R> where
R: Unpin,
[src]
R: Unpin,
impl<R> !UnwindSafe for EventReader<R>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,