Struct controlled_option::ControlledOption[][src]

#[repr(transparent)]
pub struct ControlledOption<T> where
    T: Niche
{ /* fields omitted */ }
Expand description

An Option type where you have control over the in-memory representation of the None and Some variants. See the module-level documentation for more information.

Implementations

Creates a new None instance for this option.

Creates a new Some instance for this option.

Returns true is the option is a None value.

Returns true is the option is a Some value.

Transforms an Option into a ControlledOption.

Transforms a ControlledOption into an Option. This gives you access to all of the usual assortment of useful methods that you expect from an Option.

Trait Implementations

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.