Lines Matching refs:error
4 use crate::error::{self, ErrorKind};
10 /// It depends on the input type `I`, the output type `O`, and the error type `E`
18 pub type IResult<I, O, E = error::Error<I>> = Result<(I, O), Err<E>>;
22 /// converts the parser's result to a type that is more consumable by error
91 /// * `Failure` indicates an unrecoverable error. As an example, if you recognize a prefix
100 /// The parser had an error (recoverable)
102 /// The parser had an unrecoverable error: we got to the right
118 /// Applies the given function to the inner error
153 impl<T> Err<error::Error<T>> {
154 /// Maps `Err<error::Error<T>>` to `Err<error::Error<U>>` with the given `F: T -> U`
155 pub fn map_input<U, F>(self, f: F) -> Err<error::Error<U>>
161 Err::Failure(error::Error { input, code }) => Err::Failure(error::Error {
165 Err::Error(error::Error { input, code }) => Err::Error(error::Error {
194 impl Err<error::Error<&[u8]>> {
197 pub fn to_owned(self) -> Err<error::Error<Vec<u8>>> {
203 impl Err<error::Error<&str>> {
206 pub fn to_owned(self) -> Err<error::Error<String>> {
228 use std::error::Error;
236 None // no underlying error
243 /// either the remaining input and the output value, or an error
304 /// automatically converts the parser's output and error values to another type, as long as they
415 impl<'a, I: Clone, O, E: crate::error::ParseError<I>, F: Parser<I, O, E>, G: Parser<I, O, E>>
445 E2: crate::error::ParseError<I> + From<E1>,
462 use crate::error::ErrorKind;