pub trait TryFromFilter<F>: Sized {
type Error;
// Required method
fn try_from_filter(filter: F) -> Result<Self, Self::Error>;
}Expand description
The fallible crossing: build a comparison from a filter, converting each operand.
§What the error is, and is not
It is the conversion’s own — whatever V: TryFrom<D> reports for the widths involved, or
whatever a declared converter returns. It is NOT a lowering failure: once a comparison holds
storage values, rendering it binds them and cannot fail, which is why every SQL dialect’s
Backend::Error is Infallible. The
crossing is where the fallibility of the whole path lives.
Required Associated Types§
Required Methods§
Sourcefn try_from_filter(filter: F) -> Result<Self, Self::Error>
fn try_from_filter(filter: F) -> Result<Self, Self::Error>
Cross filter into this comparison, or report why an operand could not follow.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
Source§impl TryFromFilter<DurationFilter> for MongoDurationComparison<i64>
Available on crate features jiff and mongo only.The crossing with no declared converter, and the ONE storage type it lands on.
impl TryFromFilter<DurationFilter> for MongoDurationComparison<i64>
jiff and mongo only.The crossing with no declared converter, and the ONE storage type it lands on.
§It names i64 where every other kind in this family is generic over V: TryFrom<D>
That generic row would be empty here, and it is measured rather than argued: with it in place of
this one, MongoDurationComparison::<i64>::try_from_filter is E0599 — its trait bounds were
not satisfied — because i64: TryFrom<SignedDuration> does not hold and no crate but jiff may
write it. Two types DO satisfy the bound — SignedDuration reflexively, and
core::time::Duration through jiff’s own conversion — and BSON has nothing for either of them
to carry as, so neither has a MongoCarrier row. The generic spelling would compile and be
reachable by nothing this backend stores.
The two spellings also cannot both exist: with the generic one present, a concrete i64 row is
error[E0119]: conflicting implementations of trait `TryFromFilter<DurationFilter>`
for type `MongoDurationComparison<i64>`
= note: upstream crates may add a new impl of trait
`std::convert::TryFrom<jiff::SignedDuration>` for type `i64` in future versionsSo naming the type is what lets the undeclared crossing reach a CHECKED converter at all.
§The refusal, and where it is not
DurationFilter::operand_nanos is that converter, and its DurationOutOfRange is this
crossing’s error rather than a MongoDB-local restatement of it: one refusal has one name, and it
is the same one a declared i64 column gets on Postgres.
It reads duration is outside ±i64 nanoseconds, which is about 292 years either way — where
SignedDuration reaches about 292 billion. Truncating instead would turn an out-of-range
operand into a plausible in-range one and match the wrong documents with nothing to notice; with
a SIGNED operand it would also flip the sign, so 292 years + 1ns becomes a large NEGATIVE
count. A MongoDB lowering has no later place to say no either: Backend::Error for Mongo
is Infallible, so the crossing is the last position that can
refuse.
ALL EIGHT slots are guarded at BOTH ENDS, in_ and not_in included. One out-of-range element
refuses the whole filter rather than being dropped, because a dropped element silently NARROWS
in_ and silently WIDENS not_in.
type Error = DurationOutOfRange
Source§impl TryFromFilter<TimeRangeFilter> for MongoTimeRangeComparison
Available on crate feature mongo only.The crossing, and the only route into a MongoTimeRangeComparison.
impl TryFromFilter<TimeRangeFilter> for MongoTimeRangeComparison
mongo only.The crossing, and the only route into a MongoTimeRangeComparison.
Infallible for the SQL twin’s reason, which is a PROOF rather than
an optimism: an interval operand has already been through TimeRange::new, and each component
filter crosses through Timestamp: TryFrom<Timestamp> — std’s reflexive blanket, whose error IS
Infallible.
Source§impl<D, I, V, Db> TryFromFilter<ScalarFilter<D, I>> for SqlCountComparison<V, Db>where
V: TryFrom<D>,
Available on crate feature sqlx only.The crossing with no declared converter: the storage type’s own TryFrom.
impl<D, I, V, Db> TryFromFilter<ScalarFilter<D, I>> for SqlCountComparison<V, Db>where
V: TryFrom<D>,
sqlx only.The crossing with no declared converter: the storage type’s own TryFrom.
A cardinality filter’s operands are usize — a collection’s length is one — and this family
compares a cardinality as i64, so the crossing every collection makes is i64: TryFrom<usize>
and its error is TryFromIntError. It REFUSES rather than
saturating, unlike edge’s ordinal, and the difference is whose number it is: an
ordinal is a slice index this crate produced, where a count operand is a client’s and a
substituted operand is a wrong result set reported as a right one.
Source§impl<D, I, V, Db> TryFromFilter<ScalarFilter<D, I>> for SqlScalarComparison<V, Db>where
V: TryFrom<D>,
Available on crate feature sqlx only.The crossing with no declared converter: the storage type’s own TryFrom.
impl<D, I, V, Db> TryFromFilter<ScalarFilter<D, I>> for SqlScalarComparison<V, Db>where
V: TryFrom<D>,
sqlx only.The crossing with no declared converter: the storage type’s own TryFrom.
When the storage type IS the field’s, V: TryFrom<V> resolves through std’s reflexive
From/Into blankets and the error is Infallible — so the
identity crossing is provably unable to fail rather than merely always succeeding.
Source§impl<D, I, V, Db> TryFromFilter<TextFilter<D, I>> for SqlTextComparison<V, Db>where
V: TryFrom<D>,
Available on crate feature sqlx only.The crossing with no declared converter — see SqlScalarComparison’s
for what the identity case buys. A String column stored as String is the common one, and it
reaches its comparison with an Infallible error.
impl<D, I, V, Db> TryFromFilter<TextFilter<D, I>> for SqlTextComparison<V, Db>where
V: TryFrom<D>,
sqlx only.The crossing with no declared converter — see SqlScalarComparison’s
for what the identity case buys. A String column stored as String is the common one, and it
reaches its comparison with an Infallible error.
Source§impl<D, I, V: TryFrom<D>> TryFromFilter<ScalarFilter<D, I>> for MongoCountComparison<V>
Available on crate feature mongo only.The crossing with no declared converter: the storage type’s own TryFrom.
impl<D, I, V: TryFrom<D>> TryFromFilter<ScalarFilter<D, I>> for MongoCountComparison<V>
mongo only.The crossing with no declared converter: the storage type’s own TryFrom.
A cardinality filter’s operands are usize — a collection’s length is one — and this family
compares a cardinality as i64, so the crossing every collection makes is i64: TryFrom<usize>
and its error is TryFromIntError. It REFUSES rather than
saturating: a count operand is a client’s number, and a substituted one is a wrong result set
reported as a right one.
Source§impl<D, I, V: TryFrom<D>> TryFromFilter<ScalarFilter<D, I>> for MongoScalarComparison<V>
Available on crate feature mongo only.The crossing with no declared converter: the storage type’s own TryFrom.
impl<D, I, V: TryFrom<D>> TryFromFilter<ScalarFilter<D, I>> for MongoScalarComparison<V>
mongo only.The crossing with no declared converter: the storage type’s own TryFrom.
When the storage type IS the field’s, V: TryFrom<V> resolves through std’s reflexive
From/Into blankets and the error is Infallible — so the
identity crossing is provably unable to fail rather than merely always succeeding.
Source§impl<D, I, V: TryFrom<D>> TryFromFilter<TextFilter<D, I>> for MongoTextComparison<V>
Available on crate feature mongo only.The crossing with no declared converter — see
MongoScalarComparison’s for what the identity case buys. A
String field stored as String is the common one, and it reaches its comparison with an
Infallible error.
impl<D, I, V: TryFrom<D>> TryFromFilter<TextFilter<D, I>> for MongoTextComparison<V>
mongo only.The crossing with no declared converter — see
MongoScalarComparison’s for what the identity case buys. A
String field stored as String is the common one, and it reaches its comparison with an
Infallible error.
Source§impl<D, V, Db> TryFromFilter<EnumFilter<D>> for SqlEnumComparison<V, Db>where
V: TryFrom<D>,
Available on crate feature sqlx only.The crossing with no declared converter — see
SqlScalarComparison’s for what the identity case buys.
impl<D, V, Db> TryFromFilter<EnumFilter<D>> for SqlEnumComparison<V, Db>where
V: TryFrom<D>,
sqlx only.The crossing with no declared converter — see
SqlScalarComparison’s for what the identity case buys.
Source§impl<D, V, Db> TryFromFilter<FlagsFilter<D>> for SqlFlagsComparison<V, Db>where
V: TryFrom<D>,
Available on crate features flags and sqlx only.The crossing with no declared converter — see
SqlScalarComparison’s for what the identity case buys.
impl<D, V, Db> TryFromFilter<FlagsFilter<D>> for SqlFlagsComparison<V, Db>where
V: TryFrom<D>,
flags and sqlx only.The crossing with no declared converter — see
SqlScalarComparison’s for what the identity case buys.
Source§impl<D, V, I, Db> TryFromFilter<BytesFilter<D, I>> for SqlBytesComparison<V, Db>where
V: TryFrom<D>,
Available on crate feature sqlx only.The crossing with no declared converter: the storage type’s own TryFrom.
impl<D, V, I, Db> TryFromFilter<BytesFilter<D, I>> for SqlBytesComparison<V, Db>where
V: TryFrom<D>,
sqlx only.The crossing with no declared converter: the storage type’s own TryFrom.
Its error is the CONVERTER’s, like every other kind’s in this family. It was
BytesCrossingError<V::Error> while a fixed column’s substring refusal lived here — an error
with a second inhabited variant even at Infallible, which meant
the identity crossing over a blob genuinely could not fail and the type would not say so. It says
so now, for both kinds, because there is nothing left to refuse.
Source§impl<D, V, const N: usize, I, Db> TryFromFilter<FixedBytesFilter<D, N, I>> for SqlBytesComparison<V, Db>where
V: TryFrom<D>,
Available on crate feature sqlx only.The fixed kind’s identity crossing — the same two lines, over eight slots.
impl<D, V, const N: usize, I, Db> TryFromFilter<FixedBytesFilter<D, N, I>> for SqlBytesComparison<V, Db>where
V: TryFrom<D>,
sqlx only.The fixed kind’s identity crossing — the same two lines, over eight slots.
Source§impl<D, V: TryFrom<D>, I> TryFromFilter<BytesFilter<D, I>> for MongoBytesComparison<V>
Available on crate feature mongo only.The BLOB’s crossing with no declared converter: the storage type’s own TryFrom.
impl<D, V: TryFrom<D>, I> TryFromFilter<BytesFilter<D, I>> for MongoBytesComparison<V>
mongo only.The BLOB’s crossing with no declared converter: the storage type’s own TryFrom.
Its error is MongoBytesCrossingError, so the identity crossing reaches
Infallible in the Operand
half alone: MongoBytesCrossingError<Infallible> keeps two inhabited variants, because neither
refusal has anything to do with converting.
It calls the GATE rather than the public entry, so the identity path pays nothing for the normalisation that entry’s bound needs.
Source§impl<D, V: TryFrom<D>, const N: usize, I> TryFromFilter<FixedBytesFilter<D, N, I>> for MongoBytesComparison<V>
Available on crate feature mongo only.The FIXED kind’s identity crossing, and its error is the CONVERTER’s.
impl<D, V: TryFrom<D>, const N: usize, I> TryFromFilter<FixedBytesFilter<D, N, I>> for MongoBytesComparison<V>
mongo only.The FIXED kind’s identity crossing, and its error is the CONVERTER’s.
That is the split stated where a type can be read: a fixed-width column has no substring field
and its BinData order is the bytewise one, so this backend has nothing to refuse it and the
error says so — V::Error at Infallible is a crossing that
provably cannot fail. Its blob twin above cannot make that claim and does not.
The body is not the gate’s, and the reason is exactly that honesty: reaching the gate would give
back a MongoBytesCrossingError with two variants this kind can never inhabit, and unwrapping
them here would be an unreachable! where the type system already knows better.
Source§impl<D, V: TryFrom<D>> TryFromFilter<EnumFilter<D>> for MongoEnumComparison<V>
Available on crate feature mongo only.The crossing with no declared converter — see
MongoScalarComparison’s for what the identity case buys.
impl<D, V: TryFrom<D>> TryFromFilter<EnumFilter<D>> for MongoEnumComparison<V>
mongo only.The crossing with no declared converter — see
MongoScalarComparison’s for what the identity case buys.
Source§impl<D, V: TryFrom<D>> TryFromFilter<FlagsFilter<D>> for MongoFlagsComparison<V>
Available on crate features flags and mongo only.The crossing with no declared converter — see
MongoScalarComparison’s for what the identity case buys.
impl<D, V: TryFrom<D>> TryFromFilter<FlagsFilter<D>> for MongoFlagsComparison<V>
flags and mongo only.The crossing with no declared converter — see
MongoScalarComparison’s for what the identity case buys.
Source§impl<D, VF, V, C: TryFromFilter<VF>, Db> TryFromFilter<QuantifiedFilter<D, VF>> for SqlCompositeEdgeComparison<V, C, Db>
Available on crate feature sqlx only.THE NARROW CROSSING INTO A COMPOSITE ELEMENT’S EDGE TABLE — and it is the two-line body its
two siblings already have.
impl<D, VF, V, C: TryFromFilter<VF>, Db> TryFromFilter<QuantifiedFilter<D, VF>> for SqlCompositeEdgeComparison<V, C, Db>
sqlx only.THE NARROW CROSSING INTO A COMPOSITE ELEMENT’S EDGE TABLE — and it is the two-line body its two siblings already have.
SqlListComparison’s and SqlEdgeComparison’s
quantified crossings are [cross_element] and [cross_count] CALLED rather than restated, and
this is the third reader of the same two: what an absent operator crosses into and how a
usize cardinality becomes this family’s integer keep one statement each in the crate.
§The face is WIDE and the CROSSING is where it narrows
QuantifiedFilter’s any slot holds the ELEMENT’S OWN FILTER whole — a
DetectedLanguageFilter, with every question that family can ask of one detection — so nothing is
lost on the way in. What can refuse is that filter’s own crossing, and the refusal arrives under
Element as the element’s error rather than as a second one
wrapping it: a doubled equality inside a detection is the same mistake whether the detection is a
column of a row or a member of a collection.
§What still NAMES this kind, and what does not
CollectionStorage is the table a declared column’s filter routes
through, and its SQLite and MySQL rows answer
SqlEdgeComparison for every element — one impl over
V: Carrier<Db>, with no case for a width. So a Vec<Detection> DECLARED on a record does not
arrive here by routing; this kind is reached by being NAMED, which is how every composite-element
party is reached today — the write plan’s
EdgeWrite::composite and the gather’s
gather_composite are written out by a
declaration too.
Routing it would mean splitting those two rows on the element type, as Postgres’s already splits
on PgCollectionStorage — a per-element row for every scalar this
crate ships, on two more dialects. That is a table rather than a line, so it is recorded here
rather than smuggled in beside a naming fix.
§There is no WIDE crossing here, and the absence is the composite kind’s own ruling
ListFilter’s seven element-bearing slots would each need an operator this
kind has not got, and this kind has not got them ON PURPOSE — see the module note: whole-collection
equality and the four lexicographic operators are questions about the COLLECTION and belong to the
order line, so an operator absent from this kind is a filter a declaration cannot write. A wide
crossing would have to refuse six operators by name at run time where the type already refuses them
at the call site, and it could not be reached anyway: a wide face publishes the element on the
wire, which is exactly the ToGraphqlInput an element with no honest
literal form declines to have.
§Errors
ListCrossingError::Element for whatever the ELEMENT filter’s own crossing refuses, and
ListCrossingError::Cardinality for a count operand past this family’s integer. The other two
variants cannot arrive: Operand is
Infallible here — this filter holds no element operand, so the
variant is UNINHABITED and the compiler says so rather than this sentence — and
JsonOrdering names four operators none of which is on this
kind.
The error type is the wide kind’s at a different E rather than a fourth crossing-error type,
which is the reuse SqlListComparison’s own row argues: a cell already
absorbing a sequence’s refusal absorbs this one through the same From.
type Error = ListCrossingError<!, <C as TryFromFilter<VF>>::Error>
Source§impl<D, VF, V, C: TryFromFilter<VF>, Db> TryFromFilter<QuantifiedFilter<D, VF>> for SqlEdgeComparison<V, C, Db>
Available on crate feature sqlx only.The NARROW crossing into an edge-table sequence comparison — the strategy the two JSON dialects
keep every collection in, so this is the impl a quantified column reaches on SQLite and MySQL.
impl<D, VF, V, C: TryFromFilter<VF>, Db> TryFromFilter<QuantifiedFilter<D, VF>> for SqlEdgeComparison<V, C, Db>
sqlx only.The NARROW crossing into an edge-table sequence comparison — the strategy the two JSON dialects keep every collection in, so this is the impl a quantified column reaches on SQLite and MySQL.
Its twin one module over — the column-stored sequence kind’s — carries the whole argument: the
two arms are [cross_element] and [cross_count] CALLED rather than restated, the seven element
slots stay unset structurally because nothing writes them, and the error is the wide kind’s at an
uninhabited E. See
SqlListComparison’s row.
§Errors
ListCrossingError::Element for whatever the element filter’s own crossing refuses, and
ListCrossingError::Cardinality for a count operand past this family’s integer. The other
two variants cannot arrive — one is uninhabited here, and one names operators this kind has not
got.
type Error = ListCrossingError<!, <C as TryFromFilter<VF>>::Error>
Source§impl<D, VF, V, C: TryFromFilter<VF>, Db> TryFromFilter<QuantifiedFilter<D, VF>> for SqlListComparison<V, C, Db>
Available on crate feature sqlx only.The narrow crossing into a column-stored sequence comparison — ONE impl for every dialect, where
the wide sequence crossing is three.
impl<D, VF, V, C: TryFromFilter<VF>, Db> TryFromFilter<QuantifiedFilter<D, VF>> for SqlListComparison<V, C, Db>
sqlx only.The narrow crossing into a column-stored sequence comparison — ONE impl for every dialect, where the wide sequence crossing is three.
§The two arms are the wide kinds’ own, called rather than restated
[cross_element] and [cross_count] are what a collection crossing’s any and count slots go
through, on all six of the existing ones. This crossing calls exactly those two, so what an
absent operator crosses into and how a usize cardinality becomes this family’s integer have
one statement each in the whole crate and this kind inherits both. What is left here is
Self::new() and two assignments, which is not semantics: the seven element slots stay unset
STRUCTURALLY — nothing writes them — rather than by seven Nones a reader has to count.
§Dialect-free, where the wide sequence crossing names its database
ListCrossingError::JsonOrdering is why that one is per-dialect: two dialects cannot answer an
element-wise collection ordering, so each refuses before crossing. This kind has no ordering
operator for any dialect to refuse, which is the same reason SqlSetComparison’s crossing is
one impl.
§Errors
ListCrossingError::Element for whatever the ELEMENT filter’s own crossing refuses, and
ListCrossingError::Cardinality for a count operand past the integer this family compares a
length as.
The other two variants cannot arrive, and each is closed by something different.
Operand carries Infallible here —
this filter holds no element operand, so there is no converter to refuse one and the variant is
UNINHABITED, which is the compiler stating it rather than this sentence.
JsonOrdering is inhabited and unreachable: it names one of
four operators none of which is on this kind.
The error type is the wide kind’s all the same, at a different E. That is what a caller gets
from the reuse — a cell already absorbing a column-stored sequence’s refusal absorbs this one
through the same row, where a fourth crossing-error type whose whole content is two variants of
an existing one would have cost every declaration another From.
type Error = ListCrossingError<!, <C as TryFromFilter<VF>>::Error>
Source§impl<D, VF, V, C: TryFromFilter<VF>> TryFromFilter<QuantifiedFilter<D, VF>> for MongoListComparison<V, C>
Available on crate feature mongo only.The NARROW crossing, into the sequence comparison this backend keeps every collection in.
impl<D, VF, V, C: TryFromFilter<VF>> TryFromFilter<QuantifiedFilter<D, VF>> for MongoListComparison<V, C>
mongo only.The NARROW crossing, into the sequence comparison this backend keeps every collection in.
§The two arms are the wide kinds’ own, called rather than restated
[cross_element] and [cross_count] are what both existing crossings put their any and
count slots through, so what an absent operator crosses into and how a usize cardinality
becomes this family’s i64 keep one statement each and this kind inherits both. What is left is
Self::new() and two assignments: the seven element slots stay unset STRUCTURALLY, because
nothing writes them.
It takes NO element converter, where the wide crossings take one or two. There is no element operand to convert — which is what the error type says next.
§Errors
MongoCollectionCrossingError::Element for whatever the element filter’s own crossing refuses,
and MongoCollectionCrossingError::Cardinality for a count operand past i64.
Operand cannot arrive and is not merely unused: it
carries Infallible here, so the variant is UNINHABITED and the
compiler is what states that this crossing never refuses an operand.
The error type is the wide kinds’ all the same, at a different E — so a cell already absorbing
a collection’s refusal absorbs this one through the same row.
type Error = MongoCollectionCrossingError<!, <C as TryFromFilter<VF>>::Error>
Source§impl<D, VF, V: TryFrom<D>, C: TryFromFilter<VF>, Db> TryFromFilter<ListFilter<D, VF>> for SqlEdgeComparison<V, C, Db>
Available on crate feature sqlx only.The identity crossing for an edge-table sequence — a Vec<String> whose elements are stored as
TEXT is the common one.
impl<D, VF, V: TryFrom<D>, C: TryFromFilter<VF>, Db> TryFromFilter<ListFilter<D, VF>> for SqlEdgeComparison<V, C, Db>
sqlx only.The identity crossing for an edge-table sequence — a Vec<String> whose elements are stored as
TEXT is the common one.
This is the impl the whole At design exists to make writable, and it is generic over the
dialect because the crossing is: which strategy stores a collection is
CollectionStorage’s answer, and by the time a filter reaches here
it has been given.
§Errors
type Error = ListCrossingError<<V as TryFrom<D>>::Error, <C as TryFromFilter<VF>>::Error>
Source§impl<D, VF, V: TryFrom<D>, C: TryFromFilter<VF>, Db> TryFromFilter<SetFilter<D, VF>> for SqlEdgeSetComparison<V, C, Db>
Available on crate feature sqlx only.The identity crossing for an edge-table set.
impl<D, VF, V: TryFrom<D>, C: TryFromFilter<VF>, Db> TryFromFilter<SetFilter<D, VF>> for SqlEdgeSetComparison<V, C, Db>
sqlx only.The identity crossing for an edge-table set.
§Errors
type Error = SetCrossingError<<V as TryFrom<D>>::Error, <C as TryFromFilter<VF>>::Error>
Source§impl<D, VF, V: TryFrom<D>, C: TryFromFilter<VF>, Db> TryFromFilter<SetFilter<D, VF>> for SqlSetComparison<V, C, Db>
Available on crate feature sqlx only.The identity crossing for a column-stored set — a set of String kept in a text[] is the
common one.
impl<D, VF, V: TryFrom<D>, C: TryFromFilter<VF>, Db> TryFromFilter<SetFilter<D, VF>> for SqlSetComparison<V, C, Db>
sqlx only.The identity crossing for a column-stored set — a set of String kept in a text[] is the
common one.
§Errors
type Error = SetCrossingError<<V as TryFrom<D>>::Error, <C as TryFromFilter<VF>>::Error>
Source§impl<D, VF, V: TryFrom<D>, C: TryFromFilter<VF>> TryFromFilter<ListFilter<D, VF>> for MongoListComparison<V, C>
Available on crate feature mongo only.The identity crossing for a sequence — a Vec<String> stored as an array of strings is the
common one.
impl<D, VF, V: TryFrom<D>, C: TryFromFilter<VF>> TryFromFilter<ListFilter<D, VF>> for MongoListComparison<V, C>
mongo only.The identity crossing for a sequence — a Vec<String> stored as an array of strings is the
common one.
§Errors
type Error = MongoCollectionCrossingError<<V as TryFrom<D>>::Error, <C as TryFromFilter<VF>>::Error>
Source§impl<D, VF, V: TryFrom<D>, C: TryFromFilter<VF>> TryFromFilter<ListFilter<D, VF>> for SqlListComparison<V, C, MySql>
Available on crate features mysql and sqlx only.
impl<D, VF, V: TryFrom<D>, C: TryFromFilter<VF>> TryFromFilter<ListFilter<D, VF>> for SqlListComparison<V, C, MySql>
mysql and sqlx only.type Error = ListCrossingError<<V as TryFrom<D>>::Error, <C as TryFromFilter<VF>>::Error>
Source§impl<D, VF, V: TryFrom<D>, C: TryFromFilter<VF>> TryFromFilter<ListFilter<D, VF>> for SqlListComparison<V, C, Postgres>
Available on crate features postgres and sqlx only.The identity crossing for a Postgres sequence column — a Vec<String> stored as a text[] is
the common one.
impl<D, VF, V: TryFrom<D>, C: TryFromFilter<VF>> TryFromFilter<ListFilter<D, VF>> for SqlListComparison<V, C, Postgres>
postgres and sqlx only.The identity crossing for a Postgres sequence column — a Vec<String> stored as a text[] is
the common one.
§Errors
type Error = ListCrossingError<<V as TryFrom<D>>::Error, <C as TryFromFilter<VF>>::Error>
Source§impl<D, VF, V: TryFrom<D>, C: TryFromFilter<VF>> TryFromFilter<ListFilter<D, VF>> for SqlListComparison<V, C, Sqlite>
Available on crate features sqlite and sqlx only.
impl<D, VF, V: TryFrom<D>, C: TryFromFilter<VF>> TryFromFilter<ListFilter<D, VF>> for SqlListComparison<V, C, Sqlite>
sqlite and sqlx only.type Error = ListCrossingError<<V as TryFrom<D>>::Error, <C as TryFromFilter<VF>>::Error>
Source§impl<D, VF, V: TryFrom<D>, C: TryFromFilter<VF>> TryFromFilter<SetFilter<D, VF>> for MongoSetComparison<V, C>
Available on crate feature mongo only.The identity crossing for a set.
impl<D, VF, V: TryFrom<D>, C: TryFromFilter<VF>> TryFromFilter<SetFilter<D, VF>> for MongoSetComparison<V, C>
mongo only.The identity crossing for a set.
§Errors
type Error = MongoCollectionCrossingError<<V as TryFrom<D>>::Error, <C as TryFromFilter<VF>>::Error>
Source§impl<Db> TryFromFilter<DetectedLanguageFilter> for SqlDetectedLanguageComparison<Db>
Available on crate features derive and sqlx only.The crossing, and the only route into a SqlDetectedLanguageComparison.
impl<Db> TryFromFilter<DetectedLanguageFilter> for SqlDetectedLanguageComparison<Db>
derive and sqlx only.The crossing, and the only route into a SqlDetectedLanguageComparison.
TryFromFilter because the identity’s crossing can refuse, and the error is ITS error rather
than a second one wrapping it: the doubled equality is the same mistake in the same place,
whether the identity is a column of its own or a detection’s half.
Source§impl<Db> TryFromFilter<DetectionFilter> for SqlDetectionComparison<Db>
Available on crate feature sqlx only.The crossing, and the only route into a SqlDetectionComparison.
impl<Db> TryFromFilter<DetectionFilter> for SqlDetectionComparison<Db>
sqlx only.The crossing, and the only route into a SqlDetectionComparison.
Infallible, and both halves are why. The label crosses through Label: TryFrom<Label>, which
is std’s reflexive blanket and cannot fail. The confidence’s own refusal is
ScoreKind’s and belongs to the EXACT width rather than to this one: a
ConfidenceOperand is a value in [0.0, 1.0] judged on its own digits at construction, 0.0
and 1.0 are exactly representable at every binary width, and rounding to nearest never crosses
a representable bound — so Score, which is binary, holds every operand that can be built.
That arm is expected rather than folded into an error type, exactly as
SqlDetectedLanguageComparison’s
crossing does: publishing a failure mode this crossing has not got would be a wider error than
the truth.
Source§impl<Db> TryFromFilter<LanguageIdFilter> for SqlLanguageIdComparison<Db>
Available on crate features derive and sqlx only.The crossing, and the only route into a SqlLanguageIdComparison.
impl<Db> TryFromFilter<LanguageIdFilter> for SqlLanguageIdComparison<Db>
derive and sqlx only.The crossing, and the only route into a SqlLanguageIdComparison.
TryFromFilter rather than FromFilter, because the doubled-equality
refusal is real — see the module docs.
§No Db bound
The crossing turns domain values into storage values, and which dialect eventually binds them
takes no part in that: the dialect is selected at the LOWERING, by String: Carrier<Db>.
Source§impl<Db> TryFromFilter<LocalTimestampFilter> for SqlLocalTimestampComparison<Db>
Available on crate features derive and sqlx and time only.The crossing, and the only route into a SqlLocalTimestampComparison.
impl<Db> TryFromFilter<LocalTimestampFilter> for SqlLocalTimestampComparison<Db>
derive and sqlx and time only.The crossing, and the only route into a SqlLocalTimestampComparison.
§No Db bound, and no error
The crossing turns domain values into storage values, and which dialect eventually binds them
takes no part in that — so this impl holds for every Db. It is also
Infallible, which the module note argues: every operand this
filter can hold already has a storage form, so there is nothing left to refuse.
Source§impl<Db> TryFromFilter<MediaTimeRangeFilter> for SqlMediaTimeRangeComparison<Db>
Available on crate features mediatime and sqlx only.The crossing, and the only route into a SqlMediaTimeRangeComparison.
impl<Db> TryFromFilter<MediaTimeRangeFilter> for SqlMediaTimeRangeComparison<Db>
mediatime and sqlx only.The crossing, and the only route into a SqlMediaTimeRangeComparison.
Source§impl<Db> TryFromFilter<MediaTimestampFilter> for SqlMediaTimestampComparison<Db>
Available on crate features mediatime and sqlx only.The crossing, and the only route into a SqlMediaTimestampComparison.
impl<Db> TryFromFilter<MediaTimestampFilter> for SqlMediaTimestampComparison<Db>
mediatime and sqlx only.The crossing, and the only route into a SqlMediaTimestampComparison.
§No Db bound
The crossing turns domain values into storage values, and which dialect eventually binds them
takes no part in that. So this impl holds for every Db, including one that is not a database.
Source§impl<Db> TryFromFilter<RateFilter> for SqlRateComparison<Db>
Available on crate features mediatime and sqlx only.The crossing, and the only route into a SqlRateComparison.
impl<Db> TryFromFilter<RateFilter> for SqlRateComparison<Db>
mediatime and sqlx only.The crossing, and the only route into a SqlRateComparison.
§No Db bound
The crossing turns domain values into storage values, and which dialect eventually binds them
takes no part in that. So this impl holds for every Db, including one that is not a database.
type Error = RateCrossingError
Source§impl<Db> TryFromFilter<TimeRangeFilter> for SqlTimeRangeComparison<Db>
Available on crate feature sqlx only.The crossing, and the only route into a SqlTimeRangeComparison.
impl<Db> TryFromFilter<TimeRangeFilter> for SqlTimeRangeComparison<Db>
sqlx only.The crossing, and the only route into a SqlTimeRangeComparison.
Infallible, and it is a PROOF rather than an optimism. Both halves
are unable to refuse: an interval operand is a TimeRange that has already been through
TimeRange::new, and each component filter crosses into SqlScalarComparison<Timestamp, _>
through Timestamp: TryFrom<Timestamp> — std’s reflexive blanket, whose error IS
Infallible. So the arm cannot be taken and no failure mode is published that this crossing has
not got.
Source§impl<Db> TryFromFilter<TimebaseFilter> for SqlTimebaseComparison<Db>
Available on crate features mediatime and sqlx only.The crossing, and the only route into a SqlTimebaseComparison.
impl<Db> TryFromFilter<TimebaseFilter> for SqlTimebaseComparison<Db>
mediatime and sqlx only.The crossing, and the only route into a SqlTimebaseComparison.
TryFromFilter and never FromFilter: the render facet’s alphabet is
checked here, so the crossing can fail, and an infallible half would in any case collide with the
blanket that lifts one into the other.
§No Db bound
The crossing turns domain values into storage values, and which dialect eventually binds them
takes no part in that — the dialect is selected at the LOWERING, by i32: Carrier<Db>. So this
impl holds for every Db, including one that is not a database at all.
Source§impl<F, C, V: ?Sized> TryFromFilter<Nullable<F>> for SqlNullable<C, V>where
C: TryFromFilter<F>,
Available on crate feature sqlx only.The crossing composes through C’s, and the error is C’s too — a null test never fails, so the
wrapper adds no way for the crossing to.
impl<F, C, V: ?Sized> TryFromFilter<Nullable<F>> for SqlNullable<C, V>where
C: TryFromFilter<F>,
sqlx only.The crossing composes through C’s, and the error is C’s too — a null test never fails, so the
wrapper adds no way for the crossing to.
type Error = <C as TryFromFilter<F>>::Error
Source§impl<F, C: FromFilter<F>> TryFromFilter<F> for C
The identity crossing is infallible, and says so in its type.
impl<F, C: FromFilter<F>> TryFromFilter<F> for C
The identity crossing is infallible, and says so in its type.
§This blanket and a per-kind TryFromFilter impl are compatible — but only one way round
A per-kind impl<D, S, Db> TryFromFilter<ScalarFilter<D>> for SqlScalarComparison<S, Db> where S: TryFrom<D> coexists with this blanket, because rustc can see that no
SqlScalarComparison<S, Db>: FromFilter<ScalarFilter<D>> impl exists and that no downstream may
add one (every type in it is local here). Writing that missing impl is what breaks it: with both
present the two overlap at D == S and rustc reports
error[E0119]: conflicting implementations of trait `TryFromFilter<ScalarFilter<_>>`
for type `SqlScalarComparison<_, _>`So the comparisons in this crate deliberately implement TryFromFilter and NOT FromFilter,
and they lose nothing by it: S: TryFrom<S> holds reflexively through std’s own
From/Into blankets with Error = Infallible, so the identity crossing keeps exactly the
property this blanket exists to give it. FromFilter remains the shorter half a DOWNSTREAM
comparison implements, where the overlap cannot arise.
Source§impl<F, C> TryFromFilter<Nullable<F>> for MongoNullable<C>where
C: TryFromFilter<F>,
Available on crate feature mongo only.The crossing composes through C’s, and the error is C’s too — a null test never fails, so the
wrapper adds no way for the crossing to.
impl<F, C> TryFromFilter<Nullable<F>> for MongoNullable<C>where
C: TryFromFilter<F>,
mongo only.The crossing composes through C’s, and the error is C’s too — a null test never fails, so the
wrapper adds no way for the crossing to.
type Error = <C as TryFromFilter<F>>::Error
Source§impl<P, TF, C, Db> TryFromFilter<TimeRangedFilter<TF>> for SqlTimeRangedComparison<P, C, Db>where
TF: Default,
C: TryFromFilter<TF>,
Available on crate feature sqlx only.The crossing, and the only route into a SqlTimeRangedComparison.
impl<P, TF, C, Db> TryFromFilter<TimeRangedFilter<TF>> for SqlTimeRangedComparison<P, C, Db>where
TF: Default,
C: TryFromFilter<TF>,
sqlx only.The crossing, and the only route into a SqlTimeRangedComparison.
The error is the PAYLOAD’s, unwrapped rather than boxed in a variant of this house’s own: the
range half is provably infallible — see SqlTimeRangeComparison’s row — so every refusal this
crossing can produce is one the payload family already names, and widening it here would publish
a failure mode that does not exist. It is the same reduction
SqlDetectedLanguageComparison makes when it reuses
LanguageIdCrossingError.
type Error = <C as TryFromFilter<TF>>::Error
Source§impl<P, TF: Default, C: TryFromFilter<TF>> TryFromFilter<TimeRangedFilter<TF>> for MongoTimeRangedComparison<P, C>
Available on crate feature mongo only.The crossing, and the error is the PAYLOAD’s — the stretch half is provably infallible, so every
refusal this crossing can produce is one the payload family already names.
impl<P, TF: Default, C: TryFromFilter<TF>> TryFromFilter<TimeRangedFilter<TF>> for MongoTimeRangedComparison<P, C>
mongo only.The crossing, and the error is the PAYLOAD’s — the stretch half is provably infallible, so every refusal this crossing can produce is one the payload family already names.
type Error = <C as TryFromFilter<TF>>::Error
Source§impl<T, CF, C, Db> TryFromFilter<BarcodeDetectionFilter<CF>> for SqlBarcodeDetectionComparison<T, C, Db>where
CF: Default,
C: TryFromFilter<CF>,
Available on crate feature sqlx only.The crossing, delegating to each facet’s own.
impl<T, CF, C, Db> TryFromFilter<BarcodeDetectionFilter<CF>> for SqlBarcodeDetectionComparison<T, C, Db>where
CF: Default,
C: TryFromFilter<CF>,
sqlx only.The crossing, delegating to each facet’s own.
The symbology’s is Infallible too, and the reason is that vocabulary’s openness: every word
names a symbology, so the crossing has nothing to refuse. That is the one place this house’s two
text-shaped facets agree.
type Error = <C as TryFromFilter<CF>>::Error
Source§impl<T, CF, C, Db> TryFromFilter<DocumentSegmentFilter<CF>> for SqlDocumentSegmentComparison<T, C, Db>where
CF: Default,
C: TryFromFilter<CF>,
Available on crate feature sqlx only.The crossing, delegating to each facet’s own.
impl<T, CF, C, Db> TryFromFilter<DocumentSegmentFilter<CF>> for SqlDocumentSegmentComparison<T, C, Db>where
CF: Default,
C: TryFromFilter<CF>,
sqlx only.The crossing, delegating to each facet’s own.
type Error = <C as TryFromFilter<CF>>::Error
Source§impl<T, CF, C, Db> TryFromFilter<LocatedDetectionFilter<CF>> for SqlLocatedDetectionComparison<T, C, Db>where
CF: Default,
C: TryFromFilter<CF>,
Available on crate feature sqlx only.The crossing, delegating to each half’s own.
impl<T, CF, C, Db> TryFromFilter<LocatedDetectionFilter<CF>> for SqlLocatedDetectionComparison<T, C, Db>where
CF: Default,
C: TryFromFilter<CF>,
sqlx only.The crossing, delegating to each half’s own.
The error is the GEOMETRY component’s, unwrapped rather than boxed in a variant of this house’s
own: the classification half’s crossing is Infallible — see
SqlDetectionComparison’s row — so every refusal this crossing can produce is one the
component family already names, and widening it here would publish a failure mode that does not
exist.
type Error = <C as TryFromFilter<CF>>::Error
Source§impl<T, CF, C, Db> TryFromFilter<TextDetectionFilter<CF>> for SqlTextDetectionComparison<T, C, Db>where
CF: Default,
C: TryFromFilter<CF>,
Available on crate feature sqlx only.The crossing, delegating to each facet’s own — and the error is the GEOMETRY component’s, for
SqlLocatedDetectionComparison’s reason: the text half crosses through std’s reflexive
blanket and the confidence’s operand is exactly representable at every binary width.
impl<T, CF, C, Db> TryFromFilter<TextDetectionFilter<CF>> for SqlTextDetectionComparison<T, C, Db>where
CF: Default,
C: TryFromFilter<CF>,
sqlx only.The crossing, delegating to each facet’s own — and the error is the GEOMETRY component’s, for
SqlLocatedDetectionComparison’s reason: the text half crosses through std’s reflexive
blanket and the confidence’s operand is exactly representable at every binary width.
type Error = <C as TryFromFilter<CF>>::Error
Source§impl<T, CF, C> TryFromFilter<BoundingBoxFilter<CF>> for SqlBoundingBoxComparison<T, C>where
CF: Default,
C: TryFromFilter<CF>,
Available on crate feature sqlx only.The crossing, on SqlPoint2Comparison’s terms and for its reason.
impl<T, CF, C> TryFromFilter<BoundingBoxFilter<CF>> for SqlBoundingBoxComparison<T, C>where
CF: Default,
C: TryFromFilter<CF>,
sqlx only.The crossing, on SqlPoint2Comparison’s terms and for its reason.
type Error = <C as TryFromFilter<CF>>::Error
Source§impl<T, CF, C> TryFromFilter<Point2Filter<CF>> for SqlPoint2Comparison<T, C>where
CF: Default,
C: TryFromFilter<CF>,
Available on crate feature sqlx only.The crossing, and the only route into a SqlPoint2Comparison.
impl<T, CF, C> TryFromFilter<Point2Filter<CF>> for SqlPoint2Comparison<T, C>where
CF: Default,
C: TryFromFilter<CF>,
sqlx only.The crossing, and the only route into a SqlPoint2Comparison.
The error is the COMPONENT’s, unwrapped rather than boxed in a variant of this house’s own: this level has no operand of its own to refuse, so every refusal the crossing can produce is one the component family already names, and widening it here would publish a failure mode that does not exist.
type Error = <C as TryFromFilter<CF>>::Error
Source§impl<T, CF, C> TryFromFilter<QuadFilter<CF>> for SqlQuadComparison<T, C>where
CF: Default,
C: TryFromFilter<CF>,
Available on crate feature sqlx only.The crossing, delegating to the corner’s own — which delegates to the component’s.
impl<T, CF, C> TryFromFilter<QuadFilter<CF>> for SqlQuadComparison<T, C>where
CF: Default,
C: TryFromFilter<CF>,
sqlx only.The crossing, delegating to the corner’s own — which delegates to the component’s.
type Error = <C as TryFromFilter<CF>>::Error
Source§impl<V, Db> TryFromFilter<BooleanFilter> for SqlBooleanComparison<V, Db>
Available on crate feature sqlx only.The crossing with no declared converter. bool stored as bool is the identity and cannot fail;
bool stored as an i16 or an i32 is a widening From and cannot fail either — so the common
boolean column reaches its comparison with an Infallible error
type.
impl<V, Db> TryFromFilter<BooleanFilter> for SqlBooleanComparison<V, Db>
sqlx only.The crossing with no declared converter. bool stored as bool is the identity and cannot fail;
bool stored as an i16 or an i32 is a widening From and cannot fail either — so the common
boolean column reaches its comparison with an Infallible error
type.
Source§impl<V, Db> TryFromFilter<DurationFilter> for SqlDurationComparison<V, Db>where
V: TryFrom<SignedDuration>,
Available on crate feature jiff and crate feature sqlx and (crate features mysql or postgres) only.The crossing with no declared converter, and it is worth having for both live dialects because
each has a default storage type that converts from a SignedDuration and CHECKS while it does:
PgDuration for the Postgres INTERVAL,
MySqlDuration for the MySQL TIME.
impl<V, Db> TryFromFilter<DurationFilter> for SqlDurationComparison<V, Db>where
V: TryFrom<SignedDuration>,
jiff and crate feature sqlx and (crate features mysql or postgres) only.The crossing with no declared converter, and it is worth having for both live dialects because
each has a default storage type that converts from a SignedDuration and CHECKS while it does:
PgDuration for the Postgres INTERVAL,
MySqlDuration for the MySQL TIME.
That is the whole reason both storage types are newtypes of this crate’s rather than sqlx’s own:
this impl is what an undeclared column reaches, so whatever TryFrom it resolves to had better
be the checked conversion — and sqlx’s types cannot carry one, impl TryFrom<SignedDuration> for
PgInterval or MySqlTime being E0117 from here.
The bound admits other Vs and always did: core::time::Duration resolves through jiff’s own
conversion, and a column may name it to move the sub-microsecond refusal to the bind. What no
longer has to be declared is the ordinary signed case.
Source§impl<V: ScoreKind, Db> TryFromFilter<ConfidenceFilter> for SqlScalarComparison<V, Db>
Available on crate feature sqlx only.THE CONFIDENCE KIND LOWERS ONTO THIS COMPARISON, which is what a widthless operand costs and
what it buys.
impl<V: ScoreKind, Db> TryFromFilter<ConfidenceFilter> for SqlScalarComparison<V, Db>
sqlx only.THE CONFIDENCE KIND LOWERS ONTO THIS COMPARISON, which is what a widthless operand costs and what it buys.
[ConfidenceFilter] is one input object over every width a confidence measures in, so its
operands carry no width — and the width has to come from somewhere. It comes from HERE: V is
the column’s own storage type, and V: ScoreKind is the row that says what one threshold means
AT that type. A Confidence<f32> column narrows the operand to binary32, a
Confidence<rust_decimal::Decimal> column reads its exact literal, and the client wrote one
threshold either way.
The comparison is the ordinary scalar one, and that is the deliverable rather than an
economy: the confidence needed a filter KIND because its OPERAND is different, and it needed no
comparison kind because its OPERATORS are not — six of the eight, over a total order, rendered by
the same push_operand_cmp every other scalar column renders through. in/not_in come out of
the crossing empty, this filter having no slot for either.
The bound is [ScoreKind] rather than the four widths written out, which is the FRAMEWORK-OPEN
posture stated as a where clause: a builtin that comes to serve as a score gets this lowering by
implementing that one trait, and no row here changes.
Source§impl<V: ScoreKind> TryFromFilter<ConfidenceFilter> for MongoScalarComparison<V>
Available on crate feature mongo only.
impl<V: ScoreKind> TryFromFilter<ConfidenceFilter> for MongoScalarComparison<V>
mongo only.Source§impl<V: TryFrom<bool>> TryFromFilter<BooleanFilter> for MongoBooleanComparison<V>
Available on crate feature mongo only.The crossing with no declared converter. bool stored as bool is the identity and cannot
fail; bool stored as an i32 is a widening From and cannot fail either — so the common
boolean field reaches its comparison with an Infallible error
type.
impl<V: TryFrom<bool>> TryFromFilter<BooleanFilter> for MongoBooleanComparison<V>
mongo only.The crossing with no declared converter. bool stored as bool is the identity and cannot
fail; bool stored as an i32 is a widening From and cannot fail either — so the common
boolean field reaches its comparison with an Infallible error
type.