Trait tap::TapResultOps
[−]
[src]
pub trait TapResultOps<T, E> { fn tap_ok<R, F: FnOnce(&mut T) -> R>(self, f: F) -> Self; fn tap_err<R, F: FnOnce(&mut E) -> R>(self, f: F) -> Self; }
Tap operations for Result
.
Required Methods
fn tap_ok<R, F: FnOnce(&mut T) -> R>(self, f: F) -> Self
Executes a closure if the value is Result::Ok(T)
.
fn tap_err<R, F: FnOnce(&mut E) -> R>(self, f: F) -> Self
Executes a closure if the value is Result::Err(E)
.