Function handle_ok

Source
pub fn handle_ok<T>(val: T) -> Result<T, Infallible>
Expand description

Converts a value into a Result<T, Infallible> so it can be used as the return type for a Handler.

Useful for closures where you can’t specify the return type and you don’t need to return an error.