Trait tap::TapOptionOps
[−]
[src]
pub trait TapOptionOps<T> { fn tap_some<R, F: FnOnce(&T) -> R>(self, f: F) -> Self; fn tap_none<R, F: FnOnce() -> R>(self, f: F) -> Self; }
Tap operations for Option
.
Required Methods
fn tap_some<R, F: FnOnce(&T) -> R>(self, f: F) -> Self
Executes a closure if the value is Option::Some(T)
.
fn tap_none<R, F: FnOnce() -> R>(self, f: F) -> Self
Executes a closure if the value is Option::None
.
Implementors
impl<T> TapOptionOps<T> for Option<T>