devela::_dep::winnow::error

Trait FromExternalError

pub trait FromExternalError<I, E> {
    // Required method
    fn from_external_error(input: &I, kind: ErrorKind, e: E) -> Self;
}
Available on crate feature dep_winnow only.
Expand description

Create a new error with an external error, from std::str::FromStr

This trait is required by the Parser::try_map combinator.

Required Methods§

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

Like ParserError::from_error_kind but also include 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§

§

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

§

fn from_external_error(_input: &I, _kind: ErrorKind, _e: E)

Implementors§

§

impl<C, I, E> FromExternalError<I, E> for ContextError<C>
where E: Error + Send + Sync + 'static,

§

impl<I, C, E> FromExternalError<I, E> for TreeError<I, C>
where E: Error + Send + Sync + 'static, I: Stream + Clone,

§

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

§

impl<I, E> FromExternalError<I, E> for InputError<I>
where I: Clone,

§

impl<I, EXT, E> FromExternalError<I, EXT> for ErrMode<E>
where E: FromExternalError<I, EXT>,