[−][src]Struct xml::reader::EventReader
A wrapper around an std::io::Read
instance which provides pull-based XML parsing.
Methods
impl<R: Read> EventReader<R>
[src]
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>
[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: Read> IntoIterator for EventReader<R>
[src]
type Item = Result<XmlEvent>
The type of the elements being iterated over.
type IntoIter = Events<R>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Events<R>
[src]
impl<B: Read> Position for EventReader<B>
[src]
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>
impl<R> Send for EventReader<R> where
R: Send,
R: Send,
impl<R> Sync for EventReader<R> where
R: Sync,
R: Sync,
impl<R> Unpin for EventReader<R> where
R: Unpin,
R: Unpin,
impl<R> !UnwindSafe for EventReader<R>
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,
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<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
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.
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>,