pub trait RpcMessage: McpMessage {
// Required methods
fn request_id(&self) -> Option<&RequestId>;
fn jsonrpc(&self) -> &str;
fn method(&self) -> Option<&str>;
}Expand description
Represents a generic MCP (Model Context Protocol) message. This trait defines methods to classify and extract information from messages.
Required Methods§
fn request_id(&self) -> Option<&RequestId>
fn jsonrpc(&self) -> &str
fn method(&self) -> Option<&str>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".