pub enum McpEnvelope {
Request(McpRequest),
Notification(McpNotification),
Response(McpResponse),
Error(McpErrorEnvelope),
}Expand description
One MCP JSON-RPC 2.0 envelope: the typed payload carried by a single frame.
The four variants are the complete envelope shapes the codec:mcp codec
round-trips; any other JSON structure is rejected.
Variants§
Request(McpRequest)
A method call with an id expecting a response.
Notification(McpNotification)
A method call without an id, expecting no response.
Response(McpResponse)
A successful result for a prior request id.
Error(McpErrorEnvelope)
A failure for a prior request id.
Trait Implementations§
Source§impl Clone for McpEnvelope
impl Clone for McpEnvelope
Source§fn clone(&self) -> McpEnvelope
fn clone(&self) -> McpEnvelope
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 McpEnvelope
impl Debug for McpEnvelope
Source§impl PartialEq for McpEnvelope
impl PartialEq for McpEnvelope
Source§fn eq(&self, other: &McpEnvelope) -> bool
fn eq(&self, other: &McpEnvelope) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for McpEnvelope
Auto Trait Implementations§
impl Freeze for McpEnvelope
impl RefUnwindSafe for McpEnvelope
impl Send for McpEnvelope
impl Sync for McpEnvelope
impl Unpin for McpEnvelope
impl UnsafeUnpin for McpEnvelope
impl UnwindSafe for McpEnvelope
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