pub enum JsonRpcResult {
Initialize {
protocol_version: String,
capabilities: Value,
server_info: ServerInfo,
instructions: Option<String>,
},
ToolsList {
tools: Vec<ToolDescription>,
},
ToolsCall {
content: Vec<Value>,
is_error: bool,
},
Empty {},
}Expand description
Typed successful-response payload. Outbound only, like its envelope: a
Deserialize here would make the fieldless Empty match any object, so
every unrecognised result would parse successfully rather than erroring.
Variants§
Initialize
Response to initialize.
Fields
§
server_info: ServerInfoServer metadata.
ToolsList
Response to tools/list.
Fields
§
tools: Vec<ToolDescription>Registered tool descriptions.
ToolsCall
Response to tools/call.
Fields
Empty
The spec’s empty {} result, used by ping.
Trait Implementations§
Source§impl Clone for JsonRpcResult
impl Clone for JsonRpcResult
Source§impl Debug for JsonRpcResult
impl Debug for JsonRpcResult
Auto Trait Implementations§
impl Freeze for JsonRpcResult
impl RefUnwindSafe for JsonRpcResult
impl Send for JsonRpcResult
impl Sync for JsonRpcResult
impl Unpin for JsonRpcResult
impl UnsafeUnpin for JsonRpcResult
impl UnwindSafe for JsonRpcResult
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