Trait MapNonBlock

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

A helper trait to provide the map_non_block function on Results.

Required Methods§

Source

fn map_non_block(self) -> Result<Option<T>>

Maps a Result<T> to a Result<Option<T>> by converting operation-would-block errors into Ok(None).

Implementations on Foreign Types§

Source§

impl<T> MapNonBlock<T> for Result<T>

Implementors§