Skip to main content

Module error

Module error 

Source
Expand description

Error types, traits and utilities.

“I like the cover,“ he said. “Don’t Panic. It’s the first helpful or intelligible thing anybody’s said to me all day.”

You can implement the Error trait to create your own parser errors, or you can use one provided by the crate like Cheap, Simple or Rich.

Re-exports§

pub use label::LabelError;

Structs§

Cheap
A very cheap error type that tracks only the error span (SimpleSpan by default). This type is most useful when you want fast parsing but do not particularly care about the quality of error messages.
EmptyErr
A ZST error type that tracks only whether a parse error occurred at all. This type is for when you want maximum parse speed, at the cost of all error reporting.
Rich
A rich default error type that tracks error spans, expected inputs, and the actual input found at an error site.
Simple
A simple error type that tracks the error span (SimpleSpan by default) and found token. This type is most useful when you want fast parsing but do not particularly care about the quality of error messages.

Enums§

RichPattern
An expected pattern for a Rich error.
RichReason
The reason for a Rich error.

Traits§

Error
A trait that describes parser error types.