[−][src]Trait take_if::TakeIf
Extension trait for Option<T>
that adds the take_if
method.
See the crate-level documentation for more information.
Associated Types
type Inner
The type contained in the Option
.
Required methods
fn take_if<F: FnOnce(&Self::Inner) -> bool>(
&mut self,
predicate: F
) -> Option<Self::Inner>
&mut self,
predicate: F
) -> Option<Self::Inner>
Takes value out of the Option
if predicate
returns true
.
See the crate-level documentation for more information.
Implementations on Foreign Types
impl<T> TakeIf for Option<T>
[src]
type Inner = T
fn take_if<F: FnOnce(&Self::Inner) -> bool>(
&mut self,
predicate: F
) -> Option<Self::Inner>
[src]
&mut self,
predicate: F
) -> Option<Self::Inner>