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
67
68
//! [`Fusable`] — the capability a RETRIEVING member answers a fused query through, and the one seam
//! the fusion tree is assembled over.
/// WHAT a member contributes to a fused query: the options package it is configured with, and the
/// question package it is asked with.
///
/// # It is a PROJECTION SEAM and never a registry
///
/// A tier that fuses several routes has to name each route's configuration TYPE, and those types are
/// written in declarations it cannot see — a graph root holds a member's type PATH and nothing else,
/// and an index's own expansion is tokens no other derive will ever read. So the parent names
/// nothing: it PROJECTS, `<Member as Fusable>::Options`, and the compiler resolves the meeting. That
/// is [`Graphql`](crate::transform::Graphql)'s mechanism one family over, and it is why a third-party
/// member joins a root's package with zero edits to the root — implement this, and the projection
/// absorbs it.
///
/// A member that retrieves nothing does not implement it, and the presence law follows from that
/// rather than from a check: a record, an operator or a blob family has no fusion package because it
/// has no `Fusable` impl, so a package that named one is `E0277` at the projection rather than a
/// silently empty field.
///
/// # TWO associated types, because the tree is TWO isomorphic trees
///
/// [`Options`](Self::Options) carries the knobs — weights, floors, the per-tier fusion flavour — and
/// [`Question`](Self::Question) carries the QUESTION, each route in its own currency. They are separate
/// seats because they are filled by different parties at different times: a deployment or a client
/// configures the first, and every request supplies the second. One seat carrying both would make a
/// query that changes no knob restate every knob.
///
/// # No bounds, on either
///
/// What a member's package must BE is the member's question. A `Default` bound would have been the
/// tempting one — a parent's `const new()` could then build a child package rather than leaving it
/// absent — and it is refused for the reason the whole options tree is `Option`-shaped: absence at a
/// parent means *this route was not configured*, which is a different fact from *this route was
/// configured with its defaults*, and only the first one composes.