pub struct McpResponse {
pub jsonrpc: String,
pub id: Value,
pub result: Option<Value>,
pub error: Option<McpError>,
}Expand description
MCP JSON-RPC response structure
Fields§
§jsonrpc: StringJSON-RPC version (always “2.0”)
id: ValueResponse ID (matches request ID)
result: Option<Value>Response result if successful
error: Option<McpError>Error if request failed
Implementations§
Trait Implementations§
Source§impl Clone for McpResponse
impl Clone for McpResponse
Source§fn clone(&self) -> McpResponse
fn clone(&self) -> McpResponse
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 McpResponse
impl Debug for McpResponse
Source§impl<'de> Deserialize<'de> for McpResponse
impl<'de> Deserialize<'de> for McpResponse
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<McpResponse, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<McpResponse, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for McpResponse
impl Serialize for McpResponse
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for McpResponse
impl RefUnwindSafe for McpResponse
impl Send for McpResponse
impl Sync for McpResponse
impl Unpin for McpResponse
impl UnsafeUnpin for McpResponse
impl UnwindSafe for McpResponse
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