pub struct McpStreamEvent {
pub id: u64,
pub event: McpEventKind,
pub data: Value,
}Expand description
One event on a session’s SSE stream. Cloneable so the broadcast channel can fan out one event to N concurrent subscribers.
The id is monotonic per session — clients carry the last seen id
in a Last-Event-ID header on reconnect to request a replay of
missed events. Heartbeats CARRY ids too (no second id space) so a
reconnecting client never sees a gap.
Fields§
§id: u64Monotonic per-session event id. First event is 1 (the init
event); 0 is reserved as the sentinel “I have never seen
anything” value clients send on first connect.
event: McpEventKindWire-event discriminator (init / message / progress /
lagged / heartbeat).
data: ValueJSON payload. For message / progress this is the full
JSON-RPC envelope minus the transport id. For init /
lagged / heartbeat it’s an event-specific Solo-shaped
object documented at each call site.
Trait Implementations§
Source§impl Clone for McpStreamEvent
impl Clone for McpStreamEvent
Source§fn clone(&self) -> McpStreamEvent
fn clone(&self) -> McpStreamEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for McpStreamEvent
impl RefUnwindSafe for McpStreamEvent
impl Send for McpStreamEvent
impl Sync for McpStreamEvent
impl Unpin for McpStreamEvent
impl UnsafeUnpin for McpStreamEvent
impl UnwindSafe for McpStreamEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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