Skip to main content

All

Trait All 

Source
pub trait All {
    type Item;

    // Required method
    fn all<F>(&self, predicate: F) -> bool
       where F: FnMut(&Self::Item) -> bool;
}
Expand description

Provides a predicate that checks whether every item matches.

Required Associated Types§

Required Methods§

Source

fn all<F>(&self, predicate: F) -> bool
where F: FnMut(&Self::Item) -> bool,

Returns true when all items match the predicate.

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> All for [T]

Source§

type Item = T

Source§

fn all<F>(&self, predicate: F) -> bool
where F: FnMut(&Self::Item) -> bool,

Implementors§