pub trait ResultExt<T, E> {
// Required method
fn ok_checked<EE: EqType<E>>(self) -> Option<T>;
}
Expand description
An extension trait adding functionality to Result
.
Required Methods§
sourcefn ok_checked<EE: EqType<E>>(self) -> Option<T>
fn ok_checked<EE: EqType<E>>(self) -> Option<T>
Like Result::ok
, but the caller must provide the error type being
discarded.
This allows code to be written which will stop compiling if a result’s error type changes in the future.
Object Safety§
This trait is not object safe.