Struct FieldFilterInput
pub struct FieldFilterInput<V> {
pub eq: Option<V>,
pub ne: Option<V>,
pub in_: Option<Vec<V>>,
pub lt: Option<V>,
pub lte: Option<V>,
pub gt: Option<V>,
pub gte: Option<V>,
pub contains: Option<String>,
pub starts_with: Option<String>,
pub is_null: Option<bool>,
}Expand description
Every operator a filterable field might support, as one flat
optional-per-operator envelope — generated per-model code reads only
the operators that make sense for a given field’s type (e.g. a
Boolean field’s generated to_filters() never looks at contains).
V is the field’s own scalar Rust type (String, i64, bool,
chrono::DateTime<Utc>, …) — never Option<V> even for an optional
field, since these operators describe a value to compare against,
not the field’s own nullability (which is_null covers instead).
Deliberately not full parity with every FieldRef method:
isTrue/isFalse are omitted (redundant with eq: true/eq: false
once callers have a real JSON boolean) and eqOrNull is omitted (a
Rust-ergonomics convenience over eq + isNull, not new capability).
Fields§
§eq: Option<V>§ne: Option<V>§in_: Option<Vec<V>>§lt: Option<V>§lte: Option<V>§gt: Option<V>§gte: Option<V>§contains: Option<String>String/Cuid/Uuid fields only.
starts_with: Option<String>String/Cuid/Uuid fields only.
is_null: Option<bool>Optional-arity fields only. Some(true) filters to rows where
the column is NULL; Some(false) filters to rows where it is
not.
Trait Implementations§
§impl<V> Clone for FieldFilterInput<V>where
V: Clone,
impl<V> Clone for FieldFilterInput<V>where
V: Clone,
§fn clone(&self) -> FieldFilterInput<V>
fn clone(&self) -> FieldFilterInput<V>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl<V> Debug for FieldFilterInput<V>where
V: Debug,
impl<V> Debug for FieldFilterInput<V>where
V: Debug,
§impl<V> Default for FieldFilterInput<V>where
V: Default,
impl<V> Default for FieldFilterInput<V>where
V: Default,
§fn default() -> FieldFilterInput<V>
fn default() -> FieldFilterInput<V>
§impl<'de, V> Deserialize<'de> for FieldFilterInput<V>where
V: Deserialize<'de>,
impl<'de, V> Deserialize<'de> for FieldFilterInput<V>where
V: Deserialize<'de>,
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<FieldFilterInput<V>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FieldFilterInput<V>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl<V> PartialEq for FieldFilterInput<V>where
V: PartialEq,
impl<V> PartialEq for FieldFilterInput<V>where
V: PartialEq,
§fn eq(&self, other: &FieldFilterInput<V>) -> bool
fn eq(&self, other: &FieldFilterInput<V>) -> bool
self and other values to be equal, and is used by ==.§impl<V> Serialize for FieldFilterInput<V>where
V: Serialize,
impl<V> Serialize for FieldFilterInput<V>where
V: Serialize,
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl<V> StructuralPartialEq for FieldFilterInput<V>where
V: PartialEq,
Auto Trait Implementations§
impl<V> Freeze for FieldFilterInput<V>where
V: Freeze,
impl<V> RefUnwindSafe for FieldFilterInput<V>where
V: RefUnwindSafe,
impl<V> Send for FieldFilterInput<V>where
V: Send,
impl<V> Sync for FieldFilterInput<V>where
V: Sync,
impl<V> Unpin for FieldFilterInput<V>where
V: Unpin,
impl<V> UnsafeUnpin for FieldFilterInput<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for FieldFilterInput<V>where
V: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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> ⓘ
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> ⓘ
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§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
MaybeRef].