Lines Matching defs:error

3 //! Parsers are generic over their error type, requiring that it implements
4 //! the `error::ParseError<Input>` trait.
9 /// This trait must be implemented by the error type of a nom parser.
14 /// It provides methods to create an error from some combinators,
17 /// Creates an error from the input position and an [ErrorKind]
20 /// Combines an existing error with a new one created from the input
22 /// through a parse tree, accumulating error context on the way
25 /// Creates an error from an input position and an expected character
38 /// to an existing error
40 /// Creates a new error from an input position, a static string and an existing error.
49 /// error types from external functions, like [std::str::FromStr]
51 /// Creates a new error from an input position, an [ErrorKind] indicating the
52 /// wrapping parser, and an external error
56 /// default error type, only contains the error' location and code
59 /// position of the error in the input data
61 /// nom error code
66 /// creates a new basic error
85 /// Create a new error from an input position and an external error
91 /// The Display implementation allows the std::error::Error implementation
94 write!(f, "error {:?} at: {}", self.code, self.input)
99 impl<I: fmt::Debug + fmt::Display> std::error::Error for Error<I> {}
102 // for the previously used error type
133 /// Creates an error from the input position and an [ErrorKind]
138 /// Combines an existing error with a new one created from the input
140 /// through a parse tree, accumulating error context on the way
145 /// This error type accumulates errors and their position when backtracking
147 /// it can be used to display user friendly error messages
203 /// Create a new error from an input position and an external error
212 writeln!(f, "Parse error:")?;
213 for (input, error) in &self.errors {
214 match error {
226 impl<I: fmt::Debug + fmt::Display> std::error::Error for VerboseError<I> {}
230 /// Create a new error from an input position, a static string and an existing error.
362 /// Indicates which parser returned an error
546 /// Creates a parse error from a `nom::ErrorKind`
552 $crate::error::make_error($input, $code)
556 /// Creates a parse error from a `nom::ErrorKind`,
557 /// the position in the input and the next error in
563 $crate::error::append_error($input, $code, $next)
575 /// use nom::{IResult, error::dbg_dmp, bytes::complete::tag};
665 println!("not an error");