pub trait Domain{
// Required methods
fn with_context(self, context: impl Display) -> Self;
fn into_source(self) -> Option<Box<dyn Error>>;
}
Expand description
This trait must be implemented for type that converts to Error
Example of such implementation can be found in crates explicit-error-http
or explicit-error-exit
for DomainError
.
Required Methods§
fn with_context(self, context: impl Display) -> Self
fn into_source(self) -> Option<Box<dyn 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.