pub enum McpEventKind {
Init,
Message,
Progress,
Lagged,
Heartbeat,
}Expand description
Discriminator for the per-session SSE event stream. The wire event:
field is rendered from the kebab-case spelling of each variant — kept
in lock-step with the constants below so handlers + clients agree
on the literal string.
Variants:
Init— emitted once when a subscriber connects (event: init). The payload includes the session id + tenant + connect ts.Message— JSON-RPCnotifications/messagefrom the P4 bridge (event: message).Progress— JSON-RPCnotifications/progressfrom P3 long-running tool handlers (event: progress).Lagged— synthetic event emitted by the GET handler when a subscriber falls past the broadcast buffer’s capacity, OR when aLast-Event-IDis older than the buffer’s oldest retained event (event: lagged). Carries{dropped: <count>}so clients know whether to resync state.Heartbeat— synthetic event emitted by the heartbeat tick to keep proxies + clients aware the stream is alive (event: heartbeat).
Variants§
Init
event: init — subscriber-connect handshake.
Message
event: message — JSON-RPC notifications/message.
Progress
event: progress — JSON-RPC notifications/progress.
Lagged
event: lagged — subscriber drifted past the buffer.
Heartbeat
event: heartbeat — periodic liveness ping.
Implementations§
Trait Implementations§
Source§impl Clone for McpEventKind
impl Clone for McpEventKind
Source§fn clone(&self) -> McpEventKind
fn clone(&self) -> McpEventKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for McpEventKind
impl Debug for McpEventKind
Source§impl PartialEq for McpEventKind
impl PartialEq for McpEventKind
Source§fn eq(&self, other: &McpEventKind) -> bool
fn eq(&self, other: &McpEventKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for McpEventKind
impl Eq for McpEventKind
impl StructuralPartialEq for McpEventKind
Auto Trait Implementations§
impl Freeze for McpEventKind
impl RefUnwindSafe for McpEventKind
impl Send for McpEventKind
impl Sync for McpEventKind
impl Unpin for McpEventKind
impl UnsafeUnpin for McpEventKind
impl UnwindSafe for McpEventKind
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more