nom::error

Trait FromExternalError

Source
pub trait FromExternalError<I, E> {
    // Required method
    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§

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<I, E> FromExternalError<I, E> for (I, ErrorKind)

Source§

fn from_external_error(input: I, kind: ErrorKind, _e: E) -> Self

Source§

impl<I, E> FromExternalError<I, E> for ()

Source§

fn from_external_error(_input: I, _kind: ErrorKind, _e: E) -> Self

Implementors§

Source§

impl<I, E> FromExternalError<I, E> for Error<I>

Source§

impl<I, E> FromExternalError<I, E> for VerboseError<I>