Trait ListSelectors

Source
pub trait ListSelectors<T> {
    // Required methods
    fn first_that<F>(&self, predicate: F) -> Option<(&T, usize)>
       where F: Fn(&T) -> bool;
    fn last_that<F>(&self, predicate: F) -> Option<(&T, usize)>
       where F: Fn(&T) -> bool;
}

Required Methods§

Source

fn first_that<F>(&self, predicate: F) -> Option<(&T, usize)>
where F: Fn(&T) -> bool,

Source

fn last_that<F>(&self, predicate: F) -> Option<(&T, usize)>
where F: Fn(&T) -> bool,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> ListSelectors<T> for Vec<T>

Source§

fn first_that<F>(&self, predicate: F) -> Option<(&T, usize)>
where F: Fn(&T) -> bool,

Source§

fn last_that<F>(&self, predicate: F) -> Option<(&T, usize)>
where F: Fn(&T) -> bool,

Implementors§