pub enum StreamMessage {
Ready {
protocol_version: String,
scope: Scope,
executions: Vec<String>,
replayed: usize,
truncated: bool,
heartbeat_seconds: u64,
},
Heartbeat {
at: String,
},
Lagged {
dropped: u64,
},
Closing {
reason: String,
},
}Expand description
A message about the stream itself, rather than about an execution.
Same envelope as an event — a type and a data — so a client has one reader.
Variants§
Ready
The first frame of every connection: what was subscribed to, what was replayed, and what the client should expect.
Fields
protocol_version: StringThe event protocol this server speaks, PROTOCOL_VERSION.
replayed: usizeHow many retained events were written before this connection went live, over every execution it follows.
Heartbeat
The channel is quiet and alive: written with the ping on every quiet heartbeat, as a text frame a page can see, so a client that has heard nothing for a few heartbeats knows the connection is dead and reconnects from its cursor.
Lagged
The client fell behind and events were dropped rather than buffered. It must read the snapshot and the history again, from the last sequence it saw.
Closing
The server is closing this connection.
Trait Implementations§
Source§impl Clone for StreamMessage
impl Clone for StreamMessage
Source§fn clone(&self) -> StreamMessage
fn clone(&self) -> StreamMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StreamMessage
impl Debug for StreamMessage
Source§impl<'de> Deserialize<'de> for StreamMessage
impl<'de> Deserialize<'de> for StreamMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for StreamMessage
Source§impl JsonSchema for StreamMessage
impl JsonSchema for StreamMessage
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for StreamMessage
impl PartialEq for StreamMessage
Source§fn eq(&self, other: &StreamMessage) -> bool
fn eq(&self, other: &StreamMessage) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for StreamMessage
impl Serialize for StreamMessage
impl StructuralPartialEq for StreamMessage
Auto Trait Implementations§
impl Freeze for StreamMessage
impl RefUnwindSafe for StreamMessage
impl Send for StreamMessage
impl Sync for StreamMessage
impl Unpin for StreamMessage
impl UnsafeUnpin for StreamMessage
impl UnwindSafe for StreamMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.