pub trait ErrorContext<T> {
// Required method
fn context_internal_error(
self,
message: impl Display,
) -> Result<T, ApiError>;
// Provided method
fn with_context_internal_error(
self,
message: impl FnOnce() -> String,
) -> Result<T, ApiError>
where Self: Sized { ... }
}Required Methods§
Sourcefn context_internal_error(self, message: impl Display) -> Result<T, ApiError>
fn context_internal_error(self, message: impl Display) -> Result<T, ApiError>
Make a new internal server error with the given message.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".