Enum efficient_enum::option::EfficientOptionInner [] [src]

pub enum EfficientOptionInner<'a, A: 'a, B: 'a, TM: 'a = TagMSB> where
    A: TaggableValue<TM, One>, 
{ IsNone(EfficientOptionInnerNone<'a, A, B, TM>), IsSome(EfficientOptionInnerSome<'a, A, B, TM>), }

A helper type for EfficientOption, gives access to EfficientOptionInnerNone and EfficientOptionInnerSome variants.

Variants

Methods

impl<'a, TM, A, B> EfficientOptionInner<'a, A, B, TM> where
    A: TaggableValue<TM, One>, 
[src]

Unwraps an option, yielding the content of a IsSome.

Panics

Panics if the value is a IsNone with a custom panic message provided by msg.

Unwraps an option, yielding the content of a IsNone.

Panics

Panics if the value is a IsSome with a custom panic message provided by msg.

Moves the value v out if it is IsSome(v).

In general, because this function may panic, its use is discouraged. Instead, prefer to use pattern matching and handle the IsNone case explicitly.

Panics

Panics if the self value equals IsNone.

Moves the value v out if it is IsNone(v).

In general, because this function may panic, its use is discouraged. Instead, prefer to use pattern matching and handle the IsSome case explicitly.

Panics

Panics if the self value equals IsSome.

Returns the contained IsSome value or a default.

Returns the contained IsNone value or a default.

Returns the contained IsSome value or computes it from a closure.

Returns the contained IsNone value or computes it from a closure.

Applies a function to the contained IsSome value or returns a default.

Applies a function to the contained IsNone value or returns a default.

Applies a function to the contained IsSome value or computes a default from the IsNone.