pub trait ResultExt<T> {
// Required methods
fn context(self, msg: &str) -> Result<T, RokError>;
fn with_context<F: FnOnce() -> String>(self, f: F) -> Result<T, RokError>;
fn map_rok_err(self, variant: fn(String) -> RokError) -> Result<T, RokError>;
fn or_not_found(self, resource: &str) -> Result<T, RokError>;
}Required Methods§
fn context(self, msg: &str) -> Result<T, RokError>
fn with_context<F: FnOnce() -> String>(self, f: F) -> Result<T, RokError>
fn map_rok_err(self, variant: fn(String) -> RokError) -> Result<T, RokError>
fn or_not_found(self, resource: &str) -> Result<T, RokError>
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.