Skip to main content

first_or_optional

Function first_or_optional 

Source
pub fn first_or_optional<T>(
    source: impl IntoIterator<Item = T>,
    selector: impl Fn(&T) -> bool,
) -> Option<T>
Expand description

The first item that selector accepts, or none (FirstOrOptional).