Trait stry_common::utils::fenn::OptionExt[][src]

pub trait OptionExt {
    type Item;
    fn take_if<F>(&mut self, fun: F) -> Option<Self::Item>
    where
        F: FnOnce(&Self::Item) -> bool
; }

Various extensions to Option.

Associated Types

type Item[src]

The item type inside the Option.

Loading content...

Required methods

fn take_if<F>(&mut self, fun: F) -> Option<Self::Item> where
    F: FnOnce(&Self::Item) -> bool
[src]

Take the value of self only if the given condition is true.

Loading content...

Implementations on Foreign Types

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

type Item = T

Loading content...

Implementors

Loading content...