pub struct FieldRef(/* private fields */);Expand description
FieldRef
Zero-cost wrapper around a static field name used in predicates.
Enables method-based predicate builders without allocating.
Carries only a &'static str; use as_str or AsRef<str> to borrow it.
Implementations§
Source§impl FieldRef
impl FieldRef
Sourcepub fn eq(self, value: impl Into<FilterValue>) -> FilterExpr
pub fn eq(self, value: impl Into<FilterValue>) -> FilterExpr
Strict equality comparison (no coercion).
Sourcepub fn text_eq_ci(self, value: impl Into<FilterValue>) -> FilterExpr
pub fn text_eq_ci(self, value: impl Into<FilterValue>) -> FilterExpr
Case-insensitive equality for text fields.
Sourcepub fn ne(self, value: impl Into<FilterValue>) -> FilterExpr
pub fn ne(self, value: impl Into<FilterValue>) -> FilterExpr
Strict inequality comparison.
Sourcepub fn lt(self, value: impl Into<FilterValue>) -> FilterExpr
pub fn lt(self, value: impl Into<FilterValue>) -> FilterExpr
Less-than comparison with numeric widening.
Sourcepub fn lte(self, value: impl Into<FilterValue>) -> FilterExpr
pub fn lte(self, value: impl Into<FilterValue>) -> FilterExpr
Less-than-or-equal comparison with numeric widening.
Sourcepub fn gt(self, value: impl Into<FilterValue>) -> FilterExpr
pub fn gt(self, value: impl Into<FilterValue>) -> FilterExpr
Greater-than comparison with numeric widening.
Sourcepub fn gte(self, value: impl Into<FilterValue>) -> FilterExpr
pub fn gte(self, value: impl Into<FilterValue>) -> FilterExpr
Greater-than-or-equal comparison with numeric widening.
Sourcepub fn eq_field(self, other: impl AsRef<str>) -> FilterExpr
pub fn eq_field(self, other: impl AsRef<str>) -> FilterExpr
Strict equality comparison against another field.
Sourcepub fn ne_field(self, other: impl AsRef<str>) -> FilterExpr
pub fn ne_field(self, other: impl AsRef<str>) -> FilterExpr
Strict inequality comparison against another field.
Sourcepub fn lt_field(self, other: impl AsRef<str>) -> FilterExpr
pub fn lt_field(self, other: impl AsRef<str>) -> FilterExpr
Less-than comparison against another numeric or text field.
Sourcepub fn lte_field(self, other: impl AsRef<str>) -> FilterExpr
pub fn lte_field(self, other: impl AsRef<str>) -> FilterExpr
Less-than-or-equal comparison against another numeric or text field.
Sourcepub fn gt_field(self, other: impl AsRef<str>) -> FilterExpr
pub fn gt_field(self, other: impl AsRef<str>) -> FilterExpr
Greater-than comparison against another numeric or text field.
Sourcepub fn gte_field(self, other: impl AsRef<str>) -> FilterExpr
pub fn gte_field(self, other: impl AsRef<str>) -> FilterExpr
Greater-than-or-equal comparison against another numeric or text field.
Sourcepub fn in_list<I, V>(self, values: I) -> FilterExpr
pub fn in_list<I, V>(self, values: I) -> FilterExpr
Membership test against a fixed list (strict).
Sourcepub fn is_null(self) -> FilterExpr
pub fn is_null(self) -> FilterExpr
Field is present and explicitly null.
Sourcepub fn is_not_null(self) -> FilterExpr
pub fn is_not_null(self) -> FilterExpr
Field is present and not null.
Sourcepub fn is_missing(self) -> FilterExpr
pub fn is_missing(self) -> FilterExpr
Field is not present at all.
Sourcepub fn is_empty(self) -> FilterExpr
pub fn is_empty(self) -> FilterExpr
Field is present but empty (collection- or string-specific).
Sourcepub fn is_not_empty(self) -> FilterExpr
pub fn is_not_empty(self) -> FilterExpr
Field is present and non-empty.
Sourcepub fn text_contains(self, value: impl Into<FilterValue>) -> FilterExpr
pub fn text_contains(self, value: impl Into<FilterValue>) -> FilterExpr
Case-sensitive substring match for text fields.
Sourcepub fn text_contains_ci(self, value: impl Into<FilterValue>) -> FilterExpr
pub fn text_contains_ci(self, value: impl Into<FilterValue>) -> FilterExpr
Case-insensitive substring match for text fields.
Sourcepub fn text_starts_with(self, value: impl Into<FilterValue>) -> FilterExpr
pub fn text_starts_with(self, value: impl Into<FilterValue>) -> FilterExpr
Case-sensitive prefix match for text fields.
Sourcepub fn text_starts_with_ci(self, value: impl Into<FilterValue>) -> FilterExpr
pub fn text_starts_with_ci(self, value: impl Into<FilterValue>) -> FilterExpr
Case-insensitive prefix match for text fields.
Sourcepub fn between(
self,
lower: impl Into<FilterValue>,
upper: impl Into<FilterValue>,
) -> FilterExpr
pub fn between( self, lower: impl Into<FilterValue>, upper: impl Into<FilterValue>, ) -> FilterExpr
Inclusive range predicate lowered as field >= lower AND field <= upper.
Sourcepub fn between_fields(
self,
lower: impl AsRef<str>,
upper: impl AsRef<str>,
) -> FilterExpr
pub fn between_fields( self, lower: impl AsRef<str>, upper: impl AsRef<str>, ) -> FilterExpr
Inclusive range predicate against two other fields.
Sourcepub fn not_between(
self,
lower: impl Into<FilterValue>,
upper: impl Into<FilterValue>,
) -> FilterExpr
pub fn not_between( self, lower: impl Into<FilterValue>, upper: impl Into<FilterValue>, ) -> FilterExpr
Exclusive-outside range predicate lowered as field < lower OR field > upper.
Sourcepub fn not_between_fields(
self,
lower: impl AsRef<str>,
upper: impl AsRef<str>,
) -> FilterExpr
pub fn not_between_fields( self, lower: impl AsRef<str>, upper: impl AsRef<str>, ) -> FilterExpr
Exclusive-outside range predicate against two other fields.
Trait Implementations§
impl Copy for FieldRef
impl Eq for FieldRef
impl StructuralPartialEq for FieldRef
Auto Trait Implementations§
impl Freeze for FieldRef
impl RefUnwindSafe for FieldRef
impl Send for FieldRef
impl Sync for FieldRef
impl Unpin for FieldRef
impl UnsafeUnpin for FieldRef
impl UnwindSafe for FieldRef
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
Source§impl<T> Casing<T> for T
impl<T> Casing<T> for T
Source§fn to_case(&self, case: Case<'_>) -> String
fn to_case(&self, case: Case<'_>) -> String
self and create a new
String with the same pattern and delimiter as case. It will split on boundaries
defined at Boundary::defaults(). Read moreSource§fn set_boundaries(&self, bs: &[Boundary]) -> StateConverter<'_, T>
fn set_boundaries(&self, bs: &[Boundary]) -> StateConverter<'_, T>
StateConverter struct initialized with the boundaries provided. Read moreSource§fn remove_boundaries(&self, bs: &[Boundary]) -> StateConverter<'_, T>
fn remove_boundaries(&self, bs: &[Boundary]) -> StateConverter<'_, T>
StateConverter struct initialized without the boundaries
provided. Read moreSource§fn from_case(&self, case: Case<'_>) -> StateConverter<'_, T>
fn from_case(&self, case: Case<'_>) -> StateConverter<'_, T>
Source§fn remove_empty(&self) -> StateConverter<'_, T>
fn remove_empty(&self) -> StateConverter<'_, T>
StateConverter with the RemoveEmpty pattern prepended.
This filters out empty words before conversion, useful when splitting
produces empty words from leading, trailing, and duplicate delimiters. Read more