pub trait OkOrErr<T> {
// Required methods
fn or_err(
self,
et: ErrorType,
context: &'static str,
) -> Result<T, Box<Error>>;
fn or_err_with<C, F>(
self,
et: ErrorType,
context: F,
) -> Result<T, Box<Error>>
where C: Into<ImmutStr>,
F: FnOnce() -> C;
}
Required Methods§
fn or_err(self, et: ErrorType, context: &'static str) -> Result<T, Box<Error>>
fn or_err_with<C, F>(self, et: ErrorType, context: F) -> Result<T, Box<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.