[−][src]Trait mini_haskell::utils::control::Maybe
Named after Maybe, Just, and Nothing from Haskell.
Use this for success/failure semantics, since Either is used to model the control flow.
Associated Types
type Just
The success type in a Just.
Required methods
fn just(x: Self::Just) -> Self
Construct a success.
fn is_just(&self) -> bool
Check whether it is a success.
fn into_optional(self) -> Option<Self::Just>
Convert into an Option.
Provided methods
fn is_nothing(&self) -> bool
Check whether it is a failure.