Skip to main content

FilterNodeBuilder

Struct FilterNodeBuilder 

Source
pub struct FilterNodeBuilder;
Expand description

Builder for constructing filter nodes programmatically.

This provides a clean API for creating filters without dealing with the internal structure directly.

Implementations§

Source§

impl FilterNodeBuilder

Source

pub fn eq(key: impl Into<String>, val: impl Into<String>) -> FilterNode

Creates an equality comparison: key == val

Source

pub fn neq(key: impl Into<String>, val: impl Into<String>) -> FilterNode

Creates an inequality comparison: key != val

Source

pub fn in_set(key: impl Into<String>, vals: &[impl ToString]) -> FilterNode

Creates a set membership comparison: key in [vals…]

Source

pub fn nin(key: impl Into<String>, vals: &[impl ToString]) -> FilterNode

Creates a set non-membership comparison: key not in [vals…]

Source

pub fn exists(key: impl Into<String>) -> FilterNode

Creates an existence check: key exists

Source

pub fn not_exists(key: impl Into<String>) -> FilterNode

Creates a non-existence check: key does not exist

Source

pub fn starts_with(key: impl Into<String>, val: impl Into<String>) -> FilterNode

Creates a starts-with comparison: key starts with val

Source

pub fn ends_with(key: impl Into<String>, val: impl Into<String>) -> FilterNode

Creates an ends-with comparison: key ends with val

Source

pub fn contains(key: impl Into<String>, val: impl Into<String>) -> FilterNode

Creates a contains comparison: key contains val

Source

pub fn gt(key: impl Into<String>, val: impl Into<String>) -> FilterNode

Creates a greater-than comparison: key > val (numeric)

Source

pub fn gte(key: impl Into<String>, val: impl Into<String>) -> FilterNode

Creates a greater-than-or-equal comparison: key >= val (numeric)

Source

pub fn lt(key: impl Into<String>, val: impl Into<String>) -> FilterNode

Creates a less-than comparison: key < val (numeric)

Source

pub fn lte(key: impl Into<String>, val: impl Into<String>) -> FilterNode

Creates a less-than-or-equal comparison: key <= val (numeric)

Source

pub fn and(nodes: Vec<FilterNode>) -> FilterNode

Creates an AND logical operation: all children must match

Source

pub fn or(nodes: Vec<FilterNode>) -> FilterNode

Creates an OR logical operation: at least one child must match

Source

pub fn not(node: FilterNode) -> FilterNode

Creates a NOT logical operation: negates the child

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.