pub enum FilterPredicate {
EveryNth(usize),
Alternate,
Even,
Odd,
GreaterThan(i64),
LessThan(i64),
Equals(OperationValue),
Custom(String),
}Expand description
Filter predicates for array/stream filtering
Variants§
EveryNth(usize)
Keep every nth element
Alternate
Keep alternating elements (1st, 3rd, 5th…)
Even
Keep even indices
Odd
Keep odd indices
GreaterThan(i64)
Keep values greater than threshold
LessThan(i64)
Keep values less than threshold
Equals(OperationValue)
Keep values equal to target
Custom(String)
Custom predicate expression
Trait Implementations§
Source§impl Clone for FilterPredicate
impl Clone for FilterPredicate
Source§fn clone(&self) -> FilterPredicate
fn clone(&self) -> FilterPredicate
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FilterPredicate
impl Debug for FilterPredicate
Source§impl PartialEq for FilterPredicate
impl PartialEq for FilterPredicate
impl Eq for FilterPredicate
impl StructuralPartialEq for FilterPredicate
Auto Trait Implementations§
impl Freeze for FilterPredicate
impl RefUnwindSafe for FilterPredicate
impl Send for FilterPredicate
impl Sync for FilterPredicate
impl Unpin for FilterPredicate
impl UnwindSafe for FilterPredicate
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more