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