pub trait ExtResult<T, E>: Sealed {
// Required methods
fn contains<U: PartialEq<T>>(&self, x: &U) -> bool;
fn contains_err<F: PartialEq<E>>(&self, f: &F) -> bool;
}
Expand description
Extension trait providing additional methods for Result
.
This trait is sealed and cannot be implemented for any other type.
See also ExtOption
.
Based on work from:
- https://github.com/rust-lang/rust/issues/62358 (contains).
Required Methods§
Sourcefn contains_err<F: PartialEq<E>>(&self, f: &F) -> bool
fn contains_err<F: PartialEq<E>>(&self, f: &F) -> bool
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.