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§
Source§impl<V> Clone for FieldFilterInput<V>where
V: Clone,
impl<V> Clone for FieldFilterInput<V>where
V: Clone,
Source§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 moreSource§impl<V> Debug for FieldFilterInput<V>where
V: Debug,
impl<V> Debug for FieldFilterInput<V>where
V: Debug,
Source§impl<V> Default for FieldFilterInput<V>where
V: Default,
impl<V> Default for FieldFilterInput<V>where
V: Default,
Source§fn default() -> FieldFilterInput<V>
fn default() -> FieldFilterInput<V>
Source§impl<'de, V> Deserialize<'de> for FieldFilterInput<V>where
V: Deserialize<'de>,
impl<'de, V> Deserialize<'de> for FieldFilterInput<V>where
V: Deserialize<'de>,
Source§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>,
Source§impl<V> PartialEq for FieldFilterInput<V>where
V: PartialEq,
impl<V> PartialEq for FieldFilterInput<V>where
V: PartialEq,
Source§impl<V> Serialize for FieldFilterInput<V>where
V: Serialize,
impl<V> Serialize for FieldFilterInput<V>where
V: Serialize,
Source§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>,
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>
impl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
Source§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§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();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§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();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§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();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§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();Source§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.
Source§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);Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
WrappingSpan::make_wrapped to wrap an AST node in a span.