Module error
Error management
Parsers are generic over their error type, requiring that it implements
the error::ParseError<Input> trait.
Structs
Enums
- ErrorKind Indicates which parser returned an error
Traits
-
ContextError
This trait is required by the
contextcombinator to add a static string to an existing error -
FromExternalError
This trait is required by the
map_rescombinator to integrate error types from external functions, like [std::str::FromStr] - ParseError This trait must be implemented by the error type of a nom parser.
Functions
- append_error Combines an existing error with a new one created from the input position and an [ErrorKind]. This is useful when backtracking through a parse tree, accumulating error context on the way
- context Create a new error from an input position, a static string and an existing error. This is used mainly in the [context] combinator, to add user friendly information to errors when backtracking through a parse tree
- dbg_dmp Prints a message and the input if the parser fails.
- error_to_u32 Converts an ErrorKind to a number
- make_error Creates an error from the input position and an [ErrorKind]