Skip to main content

IterPredicate

Trait IterPredicate 

Source
pub trait IterPredicate<Item>: IntoIterator<Item = Item> + Sized {
    // Provided methods
    fn any<P>(self, p: P) -> bool
       where P: FnMut(Item) -> bool { ... }
    fn all<P>(self, p: P) -> bool
       where P: FnMut(Item) -> bool { ... }
    fn any_with<P, O>(self, other: O, p: P) -> bool
       where P: FnMut(Item, Item) -> bool,
             O: IntoIterator<Item = Item> { ... }
    fn all_with<P, O>(self, other: O, p: P) -> bool
       where P: FnMut(Item, Item) -> bool,
             O: IntoIterator<Item = Item> { ... }
}

Provided Methods§

Source

fn any<P>(self, p: P) -> bool
where P: FnMut(Item) -> bool,

Source

fn all<P>(self, p: P) -> bool
where P: FnMut(Item) -> bool,

Source

fn any_with<P, O>(self, other: O, p: P) -> bool
where P: FnMut(Item, Item) -> bool, O: IntoIterator<Item = Item>,

Source

fn all_with<P, O>(self, other: O, p: P) -> bool
where P: FnMut(Item, Item) -> bool, O: IntoIterator<Item = Item>,

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.

Implementors§

Source§

impl<Item, T> IterPredicate<Item> for T
where T: IntoIterator<Item = Item> + Sized,