pub trait NotFound<T> {
// Required methods
fn is_not_found(&self) -> bool;
fn optional(self) -> Result<Option<T>>;
}Expand description
Classifies and adapts results carrying the crate’s not-found error family.
Successful results and unrelated errors are not classified as missing, and
only a not-found error converts to an absent value. Classification
delegates to Error::is_not_found.
Required Methods§
Sourcefn is_not_found(&self) -> bool
fn is_not_found(&self) -> bool
Reports whether the result contains a not-found error.
An Ok value always returns false. Other error variants also return
false without changing the result.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".