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

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

Filters the element of an Option.

Implementors