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>