pub trait Domain{
// Required methods
fn with_context(self, context: impl Display) -> Self;
fn context(&self) -> Option<&str>;
fn into_source(self) -> Option<Box<dyn Error + Send + Sync>>;
}
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 context(&self) -> Option<&str>
fn into_source(self) -> Option<Box<dyn Error + Send + Sync>>
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.