pub trait ContextError<A> {
// Required methods
fn custom<T>(alloc: A, error: T) -> Self
where T: 'static + Send + Sync + Error;
fn message<T>(alloc: A, message: T) -> Self
where T: Display;
}Expand description
Trait governing errors raised during encodeing or decoding.
Required Methods§
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<A> ContextError<A> for String
Available on crate feature alloc only.
impl<A> ContextError<A> for String
Available on crate feature
alloc only.Source§impl<A> ContextError<A> for Error
Available on crate feature std only.
impl<A> ContextError<A> for Error
Available on crate feature
std only.