Struct reqwest_dav::re_exports::serde_xml_rs::EventReader
[−]pub struct EventReader<R>where
R: Read,{ /* private fields */ }
Expand description
A wrapper around an std::io::Read
instance which provides pull-based XML parsing.
Implementations
impl<R> EventReader<R>where
R: Read,
impl<R> EventReader<R>where
R: Read,
pub fn new(source: R) -> EventReader<R>
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>
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>
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.
pub fn source(&self) -> &R
pub fn source_mut(&mut self) -> &mut R
pub fn into_inner(self) -> R
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]>
impl<'r> EventReader<&'r [u8]>
pub fn from_str(source: &'r str) -> EventReader<&'r [u8]>
pub fn from_str(source: &'r str) -> EventReader<&'r [u8]>
A convenience method to create an XmlReader
from a string slice.
Trait Implementations
impl<R> IntoIterator for EventReader<R>where
R: Read,
impl<R> IntoIterator for EventReader<R>where
R: Read,
impl<B> Position for EventReader<B>where
B: Read,
impl<B> Position for EventReader<B>where
B: Read,
fn position(&self) -> TextPosition
fn position(&self) -> TextPosition
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,
impl<R> Sync for EventReader<R>where
R: Sync,
impl<R> Unpin for EventReader<R>where
R: Unpin,
impl<R> !UnwindSafe for EventReader<R>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more