#[non_exhaustive]pub struct McpResponse {
pub error: McpError,
pub id: String,
pub jsonrpc: String,
pub result: BTreeMap<String, Value>,
}Expand description
A JSON-RPC 2.0 response from the streamable MCP endpoint.
Models the contract’s MCPResponse schema.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.error: McpErrorThe contract’s error.
id: StringThe id of the request this answers.
jsonrpc: StringThe protocol version, always “2.0”.
result: BTreeMap<String, Value>The method’s return value on success.
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 ContractModel for McpResponse
impl ContractModel for McpResponse
Source§impl Debug for McpResponse
impl Debug for McpResponse
Source§impl Default for McpResponse
impl Default for McpResponse
Source§fn default() -> McpResponse
fn default() -> McpResponse
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for McpResponsewhere
McpResponse: Default,
impl<'de> Deserialize<'de> for McpResponsewhere
McpResponse: Default,
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 PartialEq for McpResponse
impl PartialEq for McpResponse
Source§impl Serialize for McpResponse
impl Serialize for McpResponse
impl StructuralPartialEq for McpResponse
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