Trait OptionExt

Source
pub trait OptionExt<T> {
    // Required method
    fn required(self, msg: &'static str) -> Result<T>;
}

Required Methods§

Source

fn required(self, msg: &'static str) -> Result<T>

Return an error with the given message if the the Option is None.

Implementations on Foreign Types§

Source§

impl<T> OptionExt<T> for Option<T>

Source§

fn required(self, msg: &'static str) -> Result<T>

Implementors§