Skip to main content

OrNotFound

Trait OrNotFound 

Source
pub trait OrNotFound<T> {
    // Required method
    fn or_not_found(self) -> Result<T>;
}
Expand description

Convert None into a 404.

Required Methods§

Source

fn or_not_found(self) -> Result<T>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> OrNotFound<T> for Option<T>

Implementors§