Trait stry_common::utils::PeekOption[][src]

pub trait PeekOption<T: Sized>: Sized {
    fn peep_some<F, R>(self, run: F) -> Self
    where
        F: FnOnce(&T) -> R,
        R: Sized
;
fn peep_some_mut<F, R>(self, run: F) -> Self
    where
        F: FnOnce(&mut T) -> R,
        R: Sized
;
fn peep_none<F, R>(self, run: F) -> Self
    where
        F: FnOnce() -> R,
        R: Sized
; fn peep_some_dbg<F, R>(self, run: F) -> Self
    where
        F: FnOnce(&T) -> R,
        R: Sized
, { ... }
fn peep_some_mut_dbg<F, R>(self, run: F) -> Self
    where
        F: FnOnce(&mut T) -> R,
        R: Sized
, { ... }
fn peep_none_dbg<F, R>(self, run: F) -> Self
    where
        F: FnOnce() -> R,
        R: Sized
, { ... } }

Peep, but specifically for Option’s.

Required methods

fn peep_some<F, R>(self, run: F) -> Self where
    F: FnOnce(&T) -> R,
    R: Sized
[src]

fn peep_some_mut<F, R>(self, run: F) -> Self where
    F: FnOnce(&mut T) -> R,
    R: Sized
[src]

fn peep_none<F, R>(self, run: F) -> Self where
    F: FnOnce() -> R,
    R: Sized
[src]

Loading content...

Provided methods

fn peep_some_dbg<F, R>(self, run: F) -> Self where
    F: FnOnce(&T) -> R,
    R: Sized
[src]

fn peep_some_mut_dbg<F, R>(self, run: F) -> Self where
    F: FnOnce(&mut T) -> R,
    R: Sized
[src]

fn peep_none_dbg<F, R>(self, run: F) -> Self where
    F: FnOnce() -> R,
    R: Sized
[src]

Loading content...

Implementations on Foreign Types

impl<T: Sized> PeekOption<T> for Option<T>[src]

Loading content...

Implementors

Loading content...