pub enum Outbound<'a> {
Reply {
id: u64,
result: Result<Payload, RpcError>,
},
Event {
sub: &'a str,
seq: u64,
topic: Option<&'a str>,
data: Payload,
},
Snapshot {
sub: &'a str,
seq: u64,
last: bool,
topic: &'a str,
data: Payload,
},
Subscribed {
sub: &'a str,
},
Pong,
}Expand description
A logical message sent back over a Connection (what the server emits).
Variants§
Reply
Reply to an Inbound::Request.
Fields
Event
A subscription update.
Fields
Snapshot
An initial snapshot emitted when a subscription opens (late-join).
Fields
sub: &'a strSubscription id the snapshot belongs to, so the client demux routes
it like an Event (a wildcard subscription’s
snapshots carry topics that don’t string-match the pattern key).
seq: u64Monotonic sequence number, in the same space as this
subscription’s Events: the burst is numbered
1..=N and the first event continues at N + 1, so a lost snapshot
surfaces in the next update’s SubUpdate::skipped.
Subscribed
An explicit acknowledgement that a subscription opened. Emitted by
run_session only when SessionConfig::acks_subscribe is set.
The sub is the subscription’s routing id — the same value that tags its
Events.
Pong
Keepalive response.