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>