pub enum PooledFilter<'a> {
Show 17 variants
None,
Equals(&'a str, PooledValue<'a>),
NotEquals(&'a str, PooledValue<'a>),
Lt(&'a str, PooledValue<'a>),
Lte(&'a str, PooledValue<'a>),
Gt(&'a str, PooledValue<'a>),
Gte(&'a str, PooledValue<'a>),
In(&'a str, &'a [PooledValue<'a>]),
NotIn(&'a str, &'a [PooledValue<'a>]),
Contains(&'a str, PooledValue<'a>),
StartsWith(&'a str, PooledValue<'a>),
EndsWith(&'a str, PooledValue<'a>),
IsNull(&'a str),
IsNotNull(&'a str),
And(&'a [PooledFilter<'a>]),
Or(&'a [PooledFilter<'a>]),
Not(&'a PooledFilter<'a>),
}Expand description
A filter that lives in the pool’s arena.
This is a temporary representation used during filter construction.
Call materialize() to convert it to an owned Filter.
Variants§
None
No filter (always true).
Equals(&'a str, PooledValue<'a>)
Equals comparison.
NotEquals(&'a str, PooledValue<'a>)
Not equals comparison.
Lt(&'a str, PooledValue<'a>)
Less than comparison.
Lte(&'a str, PooledValue<'a>)
Less than or equal comparison.
Gt(&'a str, PooledValue<'a>)
Greater than comparison.
Gte(&'a str, PooledValue<'a>)
Greater than or equal comparison.
In(&'a str, &'a [PooledValue<'a>])
In a list of values.
NotIn(&'a str, &'a [PooledValue<'a>])
Not in a list of values.
Contains(&'a str, PooledValue<'a>)
Contains (LIKE %value%).
StartsWith(&'a str, PooledValue<'a>)
Starts with (LIKE value%).
EndsWith(&'a str, PooledValue<'a>)
Ends with (LIKE %value).
IsNull(&'a str)
Is null check.
IsNotNull(&'a str)
Is not null check.
And(&'a [PooledFilter<'a>])
Logical AND of multiple filters.
Or(&'a [PooledFilter<'a>])
Logical OR of multiple filters.
Not(&'a PooledFilter<'a>)
Logical NOT of a filter.
Implementations§
Source§impl<'a> PooledFilter<'a>
impl<'a> PooledFilter<'a>
Sourcepub fn materialize(&self) -> Filter
pub fn materialize(&self) -> Filter
Materialize the pooled filter into an owned Filter.
This copies all data from the arena into owned allocations.
Trait Implementations§
Source§impl<'a> Clone for PooledFilter<'a>
impl<'a> Clone for PooledFilter<'a>
Source§fn clone(&self) -> PooledFilter<'a>
fn clone(&self) -> PooledFilter<'a>
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<'a> Debug for PooledFilter<'a>
impl<'a> Debug for PooledFilter<'a>
impl<'a> Copy for PooledFilter<'a>
Auto Trait Implementations§
impl<'a> Freeze for PooledFilter<'a>
impl<'a> RefUnwindSafe for PooledFilter<'a>
impl<'a> Send for PooledFilter<'a>
impl<'a> Sync for PooledFilter<'a>
impl<'a> Unpin for PooledFilter<'a>
impl<'a> UnwindSafe for PooledFilter<'a>
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