pub trait FlussoValue<K>: Serialize { }Expand description
A Rust type usable where a field of kind K is expected: as the field type
in a #[derive(FlussoDocument)] struct, and as a query value — for
kind::Keyword on Keyword::eq/Keyword::any_of, and for
kind::Date on Date::eq/Date::gte/… (String/&str, or the
chrono date types behind the chrono feature).
Built-in leaf types are pre-implemented (String/&str for keyword, the
numeric primitives for number, …). Custom enums and newtype wrappers opt in
with #[derive(FlussoValue)] (e.g. a Pro/Enterprise/Free tier enum →
Account::tier().eq(AccountTier::Pro), matched against its serde string).
FlussoDocument emits a deferred bound on this trait for any non-primitive
field type, so a document only compiles when the type genuinely fits.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".