Lines Matching defs:error
57 //! or the [error management system](https://github.com/Geal/nom/blob/main/doc/error_management.md).
137 //! and an optional error type `E`, will have the following signature:
143 //! Or like this, if you don't want to specify a custom error type (it will be `(I, ErrorKind)` by default):
152 //! use nom::{Needed, error::Error};
166 //! - An error `Err(Err::Error(c))` with `c` an error that can be built from the input position and a parser specific error
167 //! - An error `Err(Err::Incomplete(Needed))` indicating that more input is necessary. `Needed` can indicate how much data is needed
168 //! - An error `Err(Err::Failure(c))`. It works like the `Error` case, except it indicates an unrecoverable error: We cannot backtrack and test another parser
211 //! assert_eq!(alt_tags(&b"ijklxxx"[..]), Err(nom::Err::Error((&b"ijklxxx"[..], nom::error::ErrorKind::Tag))));
215 //! an error, **`opt`** will still succeed and return None:
263 //! use nom::{error::ErrorKind, Needed,
330 //! use nom::{IResult, Err, Needed, error::{Error, ErrorKind}, bytes, character};
348 //! // but the complete parser will return an error
444 pub mod error;