pub enum ClientMessage {
Request(ClientJsonrpcRequest),
Notification(ClientJsonrpcNotification),
Response(ClientJsonrpcResponse),
Error(JsonrpcError),
}
Expand description
“Similar to JsonrpcMessage, but with the variants restricted to client-side messages.” ClientMessage represents a message sent by an MCP Client and received by an MCP Server.
Variants§
Request(ClientJsonrpcRequest)
Notification(ClientJsonrpcNotification)
Response(ClientJsonrpcResponse)
Error(JsonrpcError)
Trait Implementations§
Source§impl Clone for ClientMessage
impl Clone for ClientMessage
Source§fn clone(&self) -> ClientMessage
fn clone(&self) -> ClientMessage
Returns a copy of the value. Read more
1.0.0 · 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 ClientMessage
impl Debug for ClientMessage
Source§impl<'de> Deserialize<'de> for ClientMessage
impl<'de> Deserialize<'de> for ClientMessage
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ClientMessage
impl Display for ClientMessage
Source§impl FromStr for ClientMessage
impl FromStr for ClientMessage
Source§impl MCPMessage for ClientMessage
impl MCPMessage for ClientMessage
Auto Trait Implementations§
impl Freeze for ClientMessage
impl RefUnwindSafe for ClientMessage
impl Send for ClientMessage
impl Sync for ClientMessage
impl Unpin for ClientMessage
impl UnwindSafe for ClientMessage
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