Trait quick_xml::de::XmlRead

source ·
pub trait XmlRead<'i> {
    // Required methods
    fn next(&mut self) -> Result<PayloadEvent<'i>, DeError>;
    fn read_to_end(&mut self, name: QName<'_>) -> Result<(), DeError>;
    fn decoder(&self) -> Decoder;
}
Available on crate feature serialize only.
Expand description

Trait used by the deserializer for iterating over input. This is manually “specialized” for iterating over &[u8].

You do not need to implement this trait, it is needed to abstract from borrowing and copying data sources and reuse code in deserializer

Required Methods§

source

fn next(&mut self) -> Result<PayloadEvent<'i>, DeError>

Return an input-borrowing event.

source

fn read_to_end(&mut self, name: QName<'_>) -> Result<(), DeError>

Skips until end element is found. Unlike next() it will not allocate when it cannot satisfy the lifetime.

source

fn decoder(&self) -> Decoder

A copy of the reader’s decoder used to decode strings.

Implementors§

source§

impl<'de> XmlRead<'de> for SliceReader<'de>

source§

impl<'i, R: BufRead> XmlRead<'i> for IoReader<R>