Trait likely_stable::LikelyOption[][src]

pub trait LikelyOption: Sized {
    type Value;
    fn and_likely<U>(self, res: Option<U>) -> Option<U>;
fn and_unlikely<U>(self, res: Option<U>) -> Option<U>;
fn and_then_likely<U, F: FnOnce(Self::Value) -> Option<U>>(
        self,
        f: F
    ) -> Option<U>;
fn and_then_unlikely<U, F: FnOnce(Self::Value) -> Option<U>>(
        self,
        f: F
    ) -> Option<U>;
fn get_or_insert_likely(&mut self, value: Self::Value) -> &mut Self::Value;
fn get_or_insert_unlikely(&mut self, value: Self::Value) -> &mut Self::Value;
fn get_or_insert_with_likely<F: FnOnce() -> Self::Value>(
        &mut self,
        f: F
    ) -> &mut Self::Value;
fn get_or_insert_with_unlikely<F: FnOnce() -> Self::Value>(
        &mut self,
        f: F
    ) -> &mut Self::Value;
fn filter_likely<P: FnOnce(&Self::Value) -> bool>(
        self,
        predicate: P
    ) -> Self;
fn filter_unlikely<P: FnOnce(&Self::Value) -> bool>(
        self,
        predicate: P
    ) -> Self;
fn map_likely<U, F: FnOnce(Self::Value) -> U>(self, f: F) -> Option<U>;
fn map_unlikely<U, F: FnOnce(Self::Value) -> U>(self, f: F) -> Option<U>;
fn map_or_likely<U, F: FnOnce(Self::Value) -> U>(
        self,
        default: U,
        f: F
    ) -> U;
fn map_or_unlikely<U, F: FnOnce(Self::Value) -> U>(
        self,
        default: U,
        f: F
    ) -> U;
fn map_or_else_likely<U, D: FnOnce() -> U, F: FnOnce(Self::Value) -> U>(
        self,
        default: D,
        f: F
    ) -> U;
fn map_or_else_unlikely<U, D: FnOnce() -> U, F: FnOnce(Self::Value) -> U>(
        self,
        default: D,
        f: F
    ) -> U;
fn or_likely(self, b: Self) -> Self;
fn or_unlikely(self, b: Self) -> Self;
fn or_else_likely<F: FnOnce() -> Self>(self, b: F) -> Self;
fn or_else_unlikely<F: FnOnce() -> Self>(self, b: F) -> Self;
fn unwrap_or_likely(self, d: Self::Value) -> Self::Value;
fn unwrap_or_unlikely(self, d: Self::Value) -> Self::Value;
fn unwrap_or_else_likely<F: FnOnce() -> Self::Value>(
        self,
        b: F
    ) -> Self::Value;
fn unwrap_or_else_unlikely<F: FnOnce() -> Self::Value>(
        self,
        b: F
    ) -> Self::Value; }

Likely trait for Options

likely method suffix means likely Some.

Associated Types

Loading content...

Required methods

fn and_likely<U>(self, res: Option<U>) -> Option<U>[src]

fn and_unlikely<U>(self, res: Option<U>) -> Option<U>[src]

fn and_then_likely<U, F: FnOnce(Self::Value) -> Option<U>>(
    self,
    f: F
) -> Option<U>
[src]

fn and_then_unlikely<U, F: FnOnce(Self::Value) -> Option<U>>(
    self,
    f: F
) -> Option<U>
[src]

fn get_or_insert_likely(&mut self, value: Self::Value) -> &mut Self::Value[src]

fn get_or_insert_unlikely(&mut self, value: Self::Value) -> &mut Self::Value[src]

fn get_or_insert_with_likely<F: FnOnce() -> Self::Value>(
    &mut self,
    f: F
) -> &mut Self::Value
[src]

fn get_or_insert_with_unlikely<F: FnOnce() -> Self::Value>(
    &mut self,
    f: F
) -> &mut Self::Value
[src]

fn filter_likely<P: FnOnce(&Self::Value) -> bool>(self, predicate: P) -> Self[src]

fn filter_unlikely<P: FnOnce(&Self::Value) -> bool>(self, predicate: P) -> Self[src]

fn map_likely<U, F: FnOnce(Self::Value) -> U>(self, f: F) -> Option<U>[src]

fn map_unlikely<U, F: FnOnce(Self::Value) -> U>(self, f: F) -> Option<U>[src]

fn map_or_likely<U, F: FnOnce(Self::Value) -> U>(self, default: U, f: F) -> U[src]

fn map_or_unlikely<U, F: FnOnce(Self::Value) -> U>(self, default: U, f: F) -> U[src]

fn map_or_else_likely<U, D: FnOnce() -> U, F: FnOnce(Self::Value) -> U>(
    self,
    default: D,
    f: F
) -> U
[src]

fn map_or_else_unlikely<U, D: FnOnce() -> U, F: FnOnce(Self::Value) -> U>(
    self,
    default: D,
    f: F
) -> U
[src]

fn or_likely(self, b: Self) -> Self[src]

fn or_unlikely(self, b: Self) -> Self[src]

fn or_else_likely<F: FnOnce() -> Self>(self, b: F) -> Self[src]

fn or_else_unlikely<F: FnOnce() -> Self>(self, b: F) -> Self[src]

fn unwrap_or_likely(self, d: Self::Value) -> Self::Value[src]

fn unwrap_or_unlikely(self, d: Self::Value) -> Self::Value[src]

fn unwrap_or_else_likely<F: FnOnce() -> Self::Value>(self, b: F) -> Self::Value[src]

fn unwrap_or_else_unlikely<F: FnOnce() -> Self::Value>(
    self,
    b: F
) -> Self::Value
[src]

Loading content...

Implementations on Foreign Types

impl<T> LikelyOption for Option<T>[src]

type Value = T

Loading content...

Implementors

Loading content...