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
//! The computed verdict of a [`Handle`](super::Handle) body: one canonical return shape per
//! input family, fixed by the trait itself.
//!
//! The shape is computed, not chosen: the input axis picks the family
//! ([`OneByOne`] / [`Batched`]) and the reply parameter `R` is the `Ok` side, so an illegal
//! combination (a batch body with a single-message verdict, a reply from a body that declared
//! none) has no type to be written in, and `async fn handle` bodies match the trait signature
//! exactly. The canonical spellings:
//!
//! - one-by-one: `Result<(), HandlerOutcome>`, and `Result<Reply, HandlerOutcome>` for a reply
//! body;
//! - batched: `Result<(), Vec<HandlerOutcome>>` (the `Err` vector settles element-wise and is
//! batch-length by contract), and `Result<Vec<Reply>, Vec<HandlerOutcome>>` for a batch reply
//! body (one reply per element).
//!
//! An [`and_after`](crate::runtime::HandlerOutcome::and_after) continuation rides the outcome
//! itself, so it stays a return capability on every shape. Per-element vectors are batch-length
//! by contract; the adapters check once per batch and panic on a mismatch (see the module docs
//! of [`handle`](super)).
use crateHandlerOutcome;
use ;
/// The single-delivery verdict family: one input, one settlement (and at most one reply).
;
/// The batch verdict family: one input slice, per-element settlement.
;
/// The error side of one family's verdict. Machinery behind [`Handle`](super::Handle); never
/// named in user code.
/// The canonical verdict of the input `In` carrying the reply `R`: exactly what a
/// [`Handle`](super::Handle) body returns.
///
/// `R` is the whole `Ok` side - `()` for a body with no reply, the reply type one-by-one, and
/// `Vec<Reply>` on a batch - and the `Err` side follows the input family: one
/// [`HandlerOutcome`], or a batch-length `Vec` of them.
pub type Verdict<In, R> = ;