rocket::mtls::x509::der_parser::asn1_rs::nom::error

Trait ContextError

Source
pub trait ContextError<I>: Sized {
    // Provided method
    fn add_context(_input: I, _ctx: &'static str, other: Self) -> Self { ... }
}
Available on crate feature mtls only.
Expand description

This trait is required by the context combinator to add a static string to an existing error

Provided Methods§

Source

fn add_context(_input: I, _ctx: &'static str, other: Self) -> Self

Creates a new error from an input position, a static string and an existing error. This is used mainly in the context combinator, to add user friendly information to errors when backtracking through a parse tree

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> ContextError<I> for (I, ErrorKind)

Source§

impl<I> ContextError<I> for ()

Implementors§

Source§

impl<I> ContextError<I> for Error<I>

Source§

impl<I> ContextError<I> for VerboseError<I>