Trait option_filter::OptionFilterExt [−][src]
pub trait OptionFilterExt { type OptionFilterInner; fn filter<F: FnOnce(&Self::OptionFilterInner) -> bool>(self, _: F) -> Self; }
Extension trait for adding a .filter()
method to Option<T>
.
This trait is intended for extending Option<T>
only, and should
not be implemented for other types.
Associated Types
type OptionFilterInner
The inner type of the Option
.
This is given an unwieldy name so that it's unlikely to conflict with other associated types.
Required Methods
fn filter<F: FnOnce(&Self::OptionFilterInner) -> bool>(self, _: F) -> Self
Filters the element of an Option
.
Implementations on Foreign Types
impl<T> OptionFilterExt for Option<T>
[src]
impl<T> OptionFilterExt for Option<T>