pub trait ResultExt: Sized {
type Ok;
// Required method
fn wrap_with_context(self, f: impl FnOnce() -> String) -> Result<Self::Ok>;
// Provided method
fn wrap_context(self, s: &str) -> Result<Self::Ok> { ... }
}
Required Associated Types§
Required Methods§
Provided Methods§
fn wrap_context(self, s: &str) -> Result<Self::Ok>
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.