pub trait OptionExt<T> { // Required method fn required(self, msg: &'static str) -> Result<T>; }
Return an error with the given message if the the Option is None.