Module winnow::error

source ·
Expand description

Error management

Errors are designed with multiple needs in mind:

To abstract these needs away from the user, generally winnow parsers use the IResult alias, rather than Result. finish is provided for top-level parsers to integrate with your application’s error reporting.

Error types include:

Structs

Default error type, only contains the error’ location and kind
Accumulates error information while backtracking

Enums

The Err enum indicates the parser was not successful
Provide some minor debug context for errors
Contains information on needed data if a parser returned Incomplete
Error context for VerboseError

Traits

Used by Parser::context to add custom data to error while backtracking
Equivalent of From implementation to avoid orphan rules in bits parsers
FinishIResultDeprecated
Extension trait to convert a parser’s IResult to a more manageable type
Create a new error with an external error, from std::str::FromStr
The basic Parser trait for errors

Functions

Transforms a VerboseError into a trace with input position information

Type Definitions

Holds the result of Parser