pub trait ContextError<I, C>: Sized {
// Required method
fn add_context(location: I, ctx: C, other: Self) -> Self;
}
Expand description
Updated version of nom::error::ContextError
. Allows for arbitrary
context types, rather than requiring &'static str
Required Methods§
Sourcefn add_context(location: I, ctx: C, other: Self) -> Self
fn add_context(location: I, ctx: C, other: Self) -> Self
Create a new error from an input position, a context, and an existing
error. This is used by the .context
combinator to add 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.