pub struct JsonRpcResponse {
pub jsonrpc: String,
pub id: Value,
pub result: Option<JsonRpcResult>,
pub error: Option<McpError>,
}Expand description
A JSON-RPC response from the MCP server back to the claude binary.
Outbound only - we construct these, never parse them.
Fields§
§jsonrpc: StringAlways "2.0".
id: ValueRequest id this response correlates to.
result: Option<JsonRpcResult>Success payload, mutually exclusive with error.
error: Option<McpError>Error payload, mutually exclusive with result.
Implementations§
Trait Implementations§
Source§impl Clone for JsonRpcResponse
impl Clone for JsonRpcResponse
Source§impl Debug for JsonRpcResponse
impl Debug for JsonRpcResponse
Auto Trait Implementations§
impl Freeze for JsonRpcResponse
impl RefUnwindSafe for JsonRpcResponse
impl Send for JsonRpcResponse
impl Sync for JsonRpcResponse
impl Unpin for JsonRpcResponse
impl UnsafeUnpin for JsonRpcResponse
impl UnwindSafe for JsonRpcResponse
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