pub struct Request {
pub jsonrpc: String,
pub id: Option<Value>,
pub method: String,
pub params: Value,
}Expand description
JSON-RPC 2.0 request envelope.
One Request corresponds to a single line on the stdio transport
under MCP’s 2025-06-18 protocol revision.
Fields§
§jsonrpc: StringJSON-RPC version marker. Must be the string "2.0".
id: Option<Value>Correlation identifier. Absent for notifications; present for
method calls that expect a paired Response.
method: StringFully-qualified method name (e.g. "tools/list").
params: ValueMethod parameters. Shape is method-specific; unused methods
receive Value::Null after deserialisation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
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 Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
impl UnwindSafe for Request
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