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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//! RPC model-CRUD input envelopes (cratestack#490).
//!
//! Moved here from `cratestack-axum::rpc::inputs`, which is where they lived
//! until this fix — an oversight relative to the parent module's opening
//! paragraph ("They live in `cratestack-core` so clients can depend on a
//! single source of truth without pulling in axum") and relative to the
//! sibling wire shapes in `super` (`RpcErrorBody`/`RpcRequest`/`RpcResponseFrame`),
//! which already made that move. It went unnoticed until `cratestack-client`
//! (a facade with genuinely no `cratestack-axum` dependency) tried to compile
//! a `transport rpc` schema with model CRUD and hit "cannot find
//! `RpcListInput` in `rpc`" — every previous consumer of
//! `::cratestack::rpc::RpcListInput` (`cratestack-pg`, `cratestack-api`,
//! `cratestack-sqlite`) carries `cratestack-axum` regardless, so the wrong
//! source crate was invisible until a facade without it existed to surface
//! it. `cratestack-axum::rpc` re-exports these same three types verbatim
//! (`pub use cratestack_core::rpc::{RpcListInput, RpcListPredicate,
//! RpcPkInput, RpcUpdateInput};`), so `cratestack-pg`/`cratestack-api`/
//! `cratestack-sqlite` see no behavior change — same names, same shapes, same
//! wire format, only the defining crate moved.
//! ---------------------------------------------------------------------------
use ;
/// RPC input for `model.<X>.get` and `model.<X>.delete`. The PK type is
/// instantiated per-model at the macro emission site.
/// RPC input for `model.<X>.update`. Parameterized on both the PK type
/// and the model's concrete `Update<X>Input` so the patch decodes
/// straight to its real type — round-tripping through
/// `serde_json::Value` would corrupt CBOR `Option::None` values (which
/// `minicbor-serde` encodes as `0xf6` simple-null but `serde_json::Value`
/// encodes as the CBOR empty-array marker; see comments in
/// `cratestack-codec-cbor`). The dispatcher re-encodes `patch` through
/// the same codec before handing it to the existing update handler.
/// Single arbitrary key/value predicate inside [`RpcListInput::filters`].
/// Models the REST URL form's "anything that isn't a reserved keyword is a
/// predicate" rule (e.g. `?published=true&authorId=42`).
/// RPC input for `model.<X>.list`. Mirrors the REST URL query 1:1 — every
/// optional field maps to a query param of the same name, predicates carry
/// arbitrary `(key, value)` pairs that aren't reserved keywords.