pub struct X402McpResponse {
pub error: Option<X402McpError>,
pub id: Option<X402McpResponseId>,
pub jsonrpc: X402McpResponseJsonrpc,
pub result: Map<String, Value>,
}Expand description
A JSON-RPC 2.0 response for the Model Context Protocol.
JSON schema
{
"description": "A JSON-RPC 2.0 response for the Model Context Protocol.",
"type": "object",
"required": [
"jsonrpc"
],
"properties": {
"error": {
"$ref": "#/components/schemas/x402McpError"
},
"id": {
"description": "Request identifier (matches the request ID, null for notifications).",
"examples": [
1
],
"oneOf": [
{
"type": "null"
},
{
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
]
},
"jsonrpc": {
"description": "JSON-RPC version.",
"examples": [
"2.0"
],
"type": "string",
"enum": [
"2.0"
]
},
"result": {
"description": "The result of the method call (present on success).",
"examples": [
{
"tools": []
}
],
"type": "object",
"additionalProperties": true
}
}
}Fields§
§error: Option<X402McpError>§id: Option<X402McpResponseId>Request identifier (matches the request ID, null for notifications).
jsonrpc: X402McpResponseJsonrpcJSON-RPC version.
result: Map<String, Value>The result of the method call (present on success).
Implementations§
Source§impl X402McpResponse
impl X402McpResponse
pub fn builder() -> X402McpResponse
Trait Implementations§
Source§impl Clone for X402McpResponse
impl Clone for X402McpResponse
Source§fn clone(&self) -> X402McpResponse
fn clone(&self) -> X402McpResponse
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 X402McpResponse
impl Debug for X402McpResponse
Source§impl<'de> Deserialize<'de> for X402McpResponse
impl<'de> Deserialize<'de> for X402McpResponse
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 From<&X402McpResponse> for X402McpResponse
impl From<&X402McpResponse> for X402McpResponse
Source§fn from(value: &X402McpResponse) -> Self
fn from(value: &X402McpResponse) -> Self
Converts to this type from the input type.
Source§impl From<X402McpResponse> for X402McpResponse
impl From<X402McpResponse> for X402McpResponse
Source§fn from(value: X402McpResponse) -> Self
fn from(value: X402McpResponse) -> Self
Converts to this type from the input type.
Source§impl Serialize for X402McpResponse
impl Serialize for X402McpResponse
Source§impl TryFrom<X402McpResponse> for X402McpResponse
impl TryFrom<X402McpResponse> for X402McpResponse
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: X402McpResponse) -> Result<Self, ConversionError>
fn try_from(value: X402McpResponse) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for X402McpResponse
impl RefUnwindSafe for X402McpResponse
impl Send for X402McpResponse
impl Sync for X402McpResponse
impl Unpin for X402McpResponse
impl UnsafeUnpin for X402McpResponse
impl UnwindSafe for X402McpResponse
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