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
84
85
86
87
88
89
//! The bus's channels as a client meets them, generated from the registry
//! (protocol/specs/src/bus/registry.json).
//!
//! - Which channels a client hears globally, and which a resource's scope
//! carries. The two are disjoint: a channel in both would reach a client
//! twice, under two ids.
//! - The field of a relayed frame's payload its trace rides in
//! (`TRACE_FIELD`), which a transport takes off before the frame is
//! delivered.
//! - A type per channel (`job:create` is `JobCreate`) that names its
//! payload's type, so the bus's typed methods take and give a channel's own
//! payload and nothing else: a wrong payload for a channel does not
//! compile. An operation's request is tied to its result and its failure
//! (`Request`), and a channel that carries an event of the record names the
//! type of the event's own payload (`Recorded`), and gives it out of a
//! stored event of its own type and of no other.
//! - How each channel is delivered, as a trait of its type: `Scoped` for one a
//! resource's scope carries, `Unscoped` for every other. A read of a scoped
//! channel names its resource, and one that names none does not compile.
use DeserializeOwned;
use ;
/// A channel of the bus.
/// A channel a resource's scope carries: an event of the record, delivered to
/// the clients that hold its resource's scope. A read of one names its
/// resource, whose scope the read holds (`crate::bus::Bus::frames_of`).
/// A channel of no resource's scope: delivered to every client whose stream
/// names it, or never sent at all. Read with `crate::bus::Bus::frames`.
/// The request channel of an operation, with the channels that answer it.
/// A channel that carries events of the record: its payload is the stored
/// event, and `Event` is the type of the event's own payload.
/// The own payload of a stored event, where the event is of the type
/// `recorded`, which is its channel's name. `kind`, `id` and `payload` are
/// the stored event's.
/// The payload of a reply that carries a response.
/// The payload of a channel that carries nothing: the empty object.
include!;