Trait stry_common::utils::PeepResult[][src]

pub trait PeepResult<T: Sized, E: Sized>: Sized {
    fn peek_ok<F, R>(self, run: F) -> Self
    where
        F: FnOnce(&T) -> R,
        R: Sized
;
fn peek_ok_mut<F, R>(self, run: F) -> Self
    where
        F: FnOnce(&mut T) -> R,
        R: Sized
;
fn peek_err<F, R>(self, run: F) -> Self
    where
        F: FnOnce(&E) -> R,
        R: Sized
;
fn peek_err_mut<F, R>(self, run: F) -> Self
    where
        F: FnOnce(&mut E) -> R,
        R: Sized
; fn peek_ok_dbg<F, R>(self, run: F) -> Self
    where
        F: FnOnce(&T) -> R,
        R: Sized
, { ... }
fn peek_ok_mut_dbg<F, R>(self, run: F) -> Self
    where
        F: FnOnce(&mut T) -> R,
        R: Sized
, { ... }
fn peek_err_dbg<F, R>(self, run: F) -> Self
    where
        F: FnOnce(&E) -> R,
        R: Sized
, { ... }
fn peek_err_mut_dbg<F, R>(self, run: F) -> Self
    where
        F: FnOnce(&mut E) -> R,
        R: Sized
, { ... } }

Peep, but specifically for Result’s.

Required methods

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

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

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

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

Loading content...

Provided methods

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

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

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

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

Loading content...

Implementations on Foreign Types

impl<T: Sized, E: Sized> PeepResult<T, E> for Result<T, E>[src]

Loading content...

Implementors

Loading content...