Skip to content

ParseAllError

Defined in: elements.rs:213

Available on crate feature alloc only.

pub enum ParseAllError\<E\> {
Document(E),
Record { index: usize, error: E },
}

Error returned by the parse_all parsers, which read every element set a document holds.

A document can fail before any element set in it is separated out (JSON that does not parse, an XML element left open), or one of its element sets can fail on its own. The second carries its place, so a caller can say which satellite of a catalog it could not read.

Document(E)

The document itself could not be split into element sets.


index: usize error: E

The element set at index (0-based, in document order) could not be read.


fn map<F>(self, f: impl FnOnce(E) -> F) -> ParseAllError<F>

Turn the error inside into another type, keeping whether the document or an element set failed and, for an element set, its index.