cairo_lang_diagnostics

Trait ToOption

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

Temporary trait to allow conversions from Maybe<T> to Option<T>.

The behavior is identical to Result::ok. It is used to mark all the location where there is a conversion between the two mechanisms.

Required Methods§

Source

fn to_option(self) -> Option<T>

Implementors§

Source§

impl<T> ToOption<T> for Maybe<T>