quick_xml::de

Trait 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>