[−][src]Trait cotton::prelude::TapOptionOps
Tap operations for Option
.
Required methods
fn tap_some<R, F>(self, f: F) -> Self where
F: FnOnce(&mut T) -> R,
F: FnOnce(&mut T) -> R,
Executes a closure if the value is Option::Some(T)
.
fn tap_none<R, F>(self, f: F) -> Self where
F: FnOnce() -> R,
F: FnOnce() -> R,
Executes a closure if the value is Option::None
.
Implementations on Foreign Types
impl<T> TapOptionOps<T> for Option<T>
[src]
fn tap_some<R, F>(self, f: F) -> Option<T> where
F: FnOnce(&mut T) -> R,
[src]
F: FnOnce(&mut T) -> R,
fn tap_none<R, F>(self, f: F) -> Option<T> where
F: FnOnce() -> R,
[src]
F: FnOnce() -> R,