[−][src]Module type_freak::maybe
Trait-level equivalences to Option.
The trait Maybe corresponds to Option. The types
Just and Nothing corresponds Some
and None
respectively.
use typenum::consts::*; use type_freak::maybe::{Maybe, Just, Nothing, Unwrap, UnwrapOr}; type Opt1 = Just<U3>; type Opt2 = Nothing; type Val1 = Unwrap<Opt1>; // U3 type Val2 = UnwrapOr<Opt1, U0>; // U3 type Val3 = UnwrapOr<Opt2, U0>; // U0
Structs
Just | A type analogous to |
MaybeFilterFunctor | |
MaybeMapFunctor | |
Nothing | A type analogous to |
UnwrapFunctor | |
UnwrapOrFunctor | A Functor that unwraps Just |
Traits
Maybe | A trait analogous to Option. |
Type Definitions
MaybeFilter | |
MaybeMap | |
Unwrap | |
UnwrapOr |