pub enum Body {
Result(Value),
Error(Error),
}👎Deprecated since 0.14.0:
hand-rolled JSON-RPC types existed only to serve act_types::mcp; use rmcp::model for MCP wire types. Scheduled for removal in 0.15.0.
Expand description
The result or error payload of a JSON-RPC response.
Uses #[serde(flatten)] with the response so exactly one of
"result" or "error" appears in the JSON.
Variants§
Result(Value)
👎Deprecated since 0.14.0:
hand-rolled JSON-RPC types existed only to serve act_types::mcp; use rmcp::model for MCP wire types. Scheduled for removal in 0.15.0.
Error(Error)
👎Deprecated since 0.14.0:
hand-rolled JSON-RPC types existed only to serve act_types::mcp; use rmcp::model for MCP wire types. Scheduled for removal in 0.15.0.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Body
impl<'de> Deserialize<'de> for Body
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
Auto Trait Implementations§
impl Freeze for Body
impl RefUnwindSafe for Body
impl Send for Body
impl Sync for Body
impl Unpin for Body
impl UnsafeUnpin for Body
impl UnwindSafe for Body
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