Trait nom::error::FromExternalError
source · pub trait FromExternalError<I, E> {
fn from_external_error(input: I, kind: ErrorKind, e: E) -> Self;
}
Expand description
This trait is required by the map_res
combinator to integrate
error types from external functions, like std::str::FromStr
Required Methods§
sourcefn from_external_error(input: I, kind: ErrorKind, e: E) -> Self
fn from_external_error(input: I, kind: ErrorKind, e: E) -> Self
Creates a new error from an input position, an ErrorKind indicating the wrapping parser, and an external error
Implementations on Foreign Types§
source§impl<I, E> FromExternalError<I, E> for (I, ErrorKind)
impl<I, E> FromExternalError<I, E> for (I, ErrorKind)
fn from_external_error(input: I, kind: ErrorKind, _e: E) -> Self
source§impl<I, E> FromExternalError<I, E> for ()
impl<I, E> FromExternalError<I, E> for ()
fn from_external_error(_input: I, _kind: ErrorKind, _e: E) -> Self
Implementors§
impl<I, E> FromExternalError<I, E> for Error<I>
impl<I, E> FromExternalError<I, E> for VerboseError<I>
Available on crate feature
alloc
only.