cairo_lang_diagnostics

Type Alias Maybe

Source
pub type Maybe<T> = Result<T, DiagnosticAdded>;
Expand description

Represents an arbitrary type T or a missing output due to an error whose diagnostic was properly reported.

Aliased Type§

enum Maybe<T> {
    Ok(T),
    Err(DiagnosticAdded),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(DiagnosticAdded)

Contains the error value

Trait Implementations§

Source§

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

Source§

fn to_option(self) -> Option<T>