Skip to main content

parse_read

Function parse_read 

Source
pub fn parse_read<R: Read, V: Visitor>(
    reader: R,
    visitor: &mut V,
) -> Result<(), ReadError<V::Error>>
Expand description

Parse XML from a std::io::Read source.

This drives the full read-parse-shift loop internally, freeing the caller from managing a buffer, tracking stream_offset, or shifting unconsumed bytes.

An internal buffer of 8 KiB is used. For control over the buffer size, use parse_read_with_capacity.

ยงErrors

Returns ReadError::Xml for XML syntax errors, ReadError::Visitor for errors returned by visitor callbacks, or ReadError::Io for I/O failures from the reader.