pub trait TagError<I, T>: Sized {
// Required method
fn from_tag(input: I, tag: T) -> Self;
// Provided method
fn from_tag_no_case(input: I, tag: T) -> Self { ... }
}
Expand description
Similar to FromExternalError
and
ContextError
, this trait allows a parser
to create an error representing an unmatched tag. This allows error
messages to produce more useful context about what went wrong.
Required Methods§
Provided Methods§
Sourcefn from_tag_no_case(input: I, tag: T) -> Self
fn from_tag_no_case(input: I, tag: T) -> Self
As above, but for a case insensitive tag. By default this just
calls from_tag
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.