Skip to main content

muse_code_sdk/msp/view/
gap.rs

1// @generated from the MSP stable schema and protocol sources; do not edit by hand.
2
3use serde::Deserialize;
4use serde::Serialize;
5
6/// `view/gap` params: push delivery dropped events, and this names the hole.
7///
8/// The bracket is deferred: it flushes at the subscription's next ACCEPTED
9/// delivery, never at enqueue time, so `next` always names an event whose own
10/// delivery is proven. A run of consecutive undelivered events coalesces into
11/// one bracket keeping the FIRST range's `after`. The gap rides the protected
12/// reserved queue, so no wire-interleaving order against neighbouring
13/// deliveries is promised — the cursors carry the semantics.
14///
15/// On receipt a client may take either sanctioned recovery: splice-fill —
16/// buffer live events at cursors >= `next`, page `(after, next)` forward,
17/// discard the overlap, splice — or re-anchor through the anchored read
18/// surface. The server requires neither, cannot distinguish clients by their
19/// choice, and holds no partial-fill state.
20#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
21#[serde(rename_all = "camelCase")]
22#[non_exhaustive]
23pub struct ViewGapParams {
24    /// The session whose subscription dropped events.
25    pub session_id: String,
26    /// The last cursor delivered before the hole — the exclusive lower bound of
27    /// the undelivered range. An **opaque** view cursor: clients relay it,
28    /// never parse it.
29    pub after: String,
30    /// The first cursor delivered after the hole — the exclusive upper bound of
31    /// the undelivered range, and the position delivery continues from. An
32    /// **opaque** view cursor: clients relay it, never parse it.
33    pub next: String,
34}