pub struct QueryBuilder { /* private fields */ }Expand description
Builder for complex queries
Implementations§
Source§impl QueryBuilder
impl QueryBuilder
Sourcepub fn field_eq(
self,
field: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn field_eq( self, field: impl Into<String>, value: impl Into<String>, ) -> Self
Add a field equals constraint
Sourcepub fn numeric_eq(self, field: impl Into<String>, value: f64) -> Self
pub fn numeric_eq(self, field: impl Into<String>, value: f64) -> Self
Add a numeric equals constraint
Sourcepub fn numeric_range(
self,
field: impl Into<String>,
min: Option<f64>,
max: Option<f64>,
) -> Self
pub fn numeric_range( self, field: impl Into<String>, min: Option<f64>, max: Option<f64>, ) -> Self
Add a numeric range constraint
Add a tag constraint
Sourcepub fn contains(self, field: impl Into<String>, text: impl Into<String>) -> Self
pub fn contains(self, field: impl Into<String>, text: impl Into<String>) -> Self
Add a contains constraint
Sourcepub fn prefix(self, field: impl Into<String>, prefix: impl Into<String>) -> Self
pub fn prefix(self, field: impl Into<String>, prefix: impl Into<String>) -> Self
Add a prefix constraint
Trait Implementations§
Source§impl Default for QueryBuilder
impl Default for QueryBuilder
Source§fn default() -> QueryBuilder
fn default() -> QueryBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for QueryBuilder
impl RefUnwindSafe for QueryBuilder
impl Send for QueryBuilder
impl Sync for QueryBuilder
impl Unpin for QueryBuilder
impl UnwindSafe for QueryBuilder
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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