pub trait UnlessNotFound<T> {
// Required method
fn unless_not_found(self) -> Result<Option<T>, CallError>;
}Expand description
Makes a NotFound failure of a call None, for a call for something that
may not be there:
ⓘ
use encore::services::UnlessNotFound;
let product = catalog::openapi::get_product("xyz").await.unless_not_found()?;Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".