1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! [`Noop`] — the framework's one CROSSABLE spelling of *nothing here*, wherever an emission must
//! publish a type and the honest content is none.
//!
//! # `()` is the seam's own word, and this exists because `()` cannot cross
//!
//! [`SearchOptions`](crate::VectorEngine::SearchOptions)'s word for *no per-query knobs* is `()`,
//! and every engine reached by hand writes it. What `()` cannot do is reach a REQUEST: an emitted
//! engine variant carries `options: Option<<T as VectorEngine>::SearchOptions>`, so an engine a
//! declaration NAMES has that type published as an input — and `async_graphql` implements
//! `InputType` for no unit type, nor could this crate supply one, both the trait and `()` being
//! foreign (`E0117`).
//!
//! The obvious repair is not available either: a GraphQL input object must define at least one
//! field, so *an input object with no rows* is not a thing a schema can hold. What a schema CAN
//! hold is a SCALAR — a scalar publishes no fields — and a scalar this crate owns can carry the
//! hand-written face. So the type is a struct of this crate's own, sealed by the empty-struct
//! shape, crossing as the scalar `Noop`.
//!
//! # ONE citizen, not one per seat
//!
//! The next seat with the same shape — a published position whose honest content is none — reuses
//! this type rather than minting a sibling. That is the reason for the general name: the type says
//! *nothing here*, and WHICH nothing is the seat's own doc's to say.
//!
//! # It is a THIRD choice and not a replacement
//!
//! | an engine that … | writes | because |
//! |---|---|---|
//! | has per-query knobs | its own type, with an `InputObject` face | the knobs are reachable from a request |
//! | has none, and is NAMED by a typed word | [`Noop`] | the row is published and has to render as something |
//! | has none, and is reached by hand | `()` | nothing asks it to cross |
//!
//! The third row is the common one and stays the cheapest to write, which is the whole reason this
//! type is not the seam's default: making every engine name a framework type would tax the backends
//! that never publish anything to serve the ones that do.
/// Nothing here, as a type a schema can hold — the scalar an emission publishes where a seat is
/// mandatory and its honest content is none.
///
/// TOTAL on parse: the value carries zero information, so every value maps to the one value —
/// refusing a spelling would pretend there were something here to get wrong. Renders as `null`.
);