pub trait VerdictExt<T, W: Warning> {
// Required methods
fn map_caveat<F, U>(self, op: F) -> Verdict<U, W>
where F: FnOnce(T) -> U;
fn only_error(self) -> Result<Caveat<T, W>, Error<W>>;
}Expand description
Verdict specific extension methods for the Result type.
Required Methods§
Sourcefn map_caveat<F, U>(self, op: F) -> Verdict<U, W>where
F: FnOnce(T) -> U,
fn map_caveat<F, U>(self, op: F) -> Verdict<U, W>where
F: FnOnce(T) -> U,
Sourcefn only_error(self) -> Result<Caveat<T, W>, Error<W>>
fn only_error(self) -> Result<Caveat<T, W>, Error<W>>
Discard all warnings in the Err variant and keep only the warning that caused the 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.