11use std:: pin:: Pin ;
22
33use async_trait:: async_trait;
4- use rust_mcp_schema:: { schema_utils:: MCPMessage , RequestId } ;
4+ use rust_mcp_schema:: { schema_utils:: McpMessage , RequestId } ;
55
66use futures:: Stream ;
77
@@ -44,15 +44,15 @@ impl Default for TransportOptions {
4444///It is intended to be implemented by types that send messages in the MCP protocol, such as servers or clients.
4545///
4646/// The `McpDispatch` trait requires two associated types:
47- /// - `R`: The type of the response, which must implement the `MCPMessage ` trait and be capable of deserialization.
47+ /// - `R`: The type of the response, which must implement the `McpMessage ` trait and be capable of deserialization.
4848/// - `S`: The type of the message to send, which must be serializable and cloneable.
4949///
5050/// Both associated types `R` and `S` must be `Send`, `Sync`, and `'static` to ensure they can be used
5151/// safely in an asynchronous context and across threads.
5252///
5353/// # Associated Types
5454///
55- /// - `R`: The response type, which must implement the `MCPMessage ` trait, be `Clone`, `Send`, `Sync`, and
55+ /// - `R`: The response type, which must implement the `McpMessage ` trait, be `Clone`, `Send`, `Sync`, and
5656/// be deserializable (`DeserializeOwned`).
5757/// - `S`: The type of the message to send, which must be `Clone`, `Send`, `Sync`, and serializable (`Serialize`).
5858///
@@ -78,7 +78,7 @@ impl Default for TransportOptions {
7878#[ async_trait]
7979pub trait McpDispatch < R , S > : Send + Sync + ' static
8080where
81- R : MCPMessage + Clone + Send + Sync + serde:: de:: DeserializeOwned + ' static ,
81+ R : McpMessage + Clone + Send + Sync + serde:: de:: DeserializeOwned + ' static ,
8282 S : Clone + Send + Sync + serde:: Serialize + ' static ,
8383{
8484 /// Sends a raw message represented by type `S` and optionally includes a `request_id`.
@@ -94,14 +94,14 @@ where
9494/// and handling I/O operations.
9595///
9696/// The `Transport` trait requires three associated types:
97- /// - `R`: The message type to send, which must implement the `MCPMessage ` trait.
97+ /// - `R`: The message type to send, which must implement the `McpMessage ` trait.
9898/// - `S`: The message type to send.
9999/// - `M`: The type of message that we expect to receive as a response to the sent message.
100100///
101101#[ async_trait]
102102pub trait Transport < R , S > : Send + Sync + ' static
103103where
104- R : MCPMessage + Clone + Send + Sync + serde:: de:: DeserializeOwned + ' static ,
104+ R : McpMessage + Clone + Send + Sync + serde:: de:: DeserializeOwned + ' static ,
105105 S : Clone + Send + Sync + serde:: Serialize + ' static ,
106106{
107107 async fn start (
0 commit comments