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.