Trait mentat_core::util::OptionEffect [] [src]

pub trait OptionEffect<T> {
    fn when_none<F: FnOnce()>(self, f: F) -> Self;
fn when_some<F: FnOnce()>(self, f: F) -> Self; }

Side-effect chaining on Option.

Required Methods

Invoke f if self is None, returning self.

Invoke f if self is Some, returning self.

Implementations on Foreign Types

impl<T> OptionEffect<T> for Option<T>
[src]

[src]

[src]

Implementors