pub struct FnPred<A, F>(/* private fields */)
where
F: Fn(&A) -> bool;Expand description
A function-based decidable predicate.
Implementations§
Trait Implementations§
Source§impl<A, F: Fn(&A) -> bool> DecidablePred<A> for FnPred<A, F>
impl<A, F: Fn(&A) -> bool> DecidablePred<A> for FnPred<A, F>
Source§fn filter_slice<'a>(&self, xs: &'a [A]) -> Vec<&'a A>
fn filter_slice<'a>(&self, xs: &'a [A]) -> Vec<&'a A>
Filter a slice, keeping elements satisfying the predicate.
Source§fn any_slice(&self, xs: &[A]) -> bool
fn any_slice(&self, xs: &[A]) -> bool
Check whether any element of a slice satisfies the predicate.
Source§fn all_slice(&self, xs: &[A]) -> bool
fn all_slice(&self, xs: &[A]) -> bool
Check whether all elements of a slice satisfy the predicate.
Source§fn count_slice(&self, xs: &[A]) -> usize
fn count_slice(&self, xs: &[A]) -> usize
Count elements of a slice satisfying the predicate.
Auto Trait Implementations§
impl<A, F> Freeze for FnPred<A, F>where
F: Freeze,
impl<A, F> RefUnwindSafe for FnPred<A, F>where
F: RefUnwindSafe,
A: RefUnwindSafe,
impl<A, F> Send for FnPred<A, F>
impl<A, F> Sync for FnPred<A, F>
impl<A, F> Unpin for FnPred<A, F>
impl<A, F> UnsafeUnpin for FnPred<A, F>where
F: UnsafeUnpin,
impl<A, F> UnwindSafe for FnPred<A, F>where
F: UnwindSafe,
A: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more