Skip to main content

McpTransportConn

Trait McpTransportConn 

pub trait McpTransportConn: Send + Sync {
    // Required methods
    fn send_and_recv<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        request: &'life1 JsonRpcRequest,
    ) -> Pin<Box<dyn Future<Output = Result<JsonRpcResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn close<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn reset<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn health_check(&mut self) -> bool { ... }
}
Expand description

Public compatibility surface for direct transport users.

The MCP client uses the cancellation-aware shared transport trait below; this mutable facade preserves the existing downstream API.

Required Methods§

Source

fn send_and_recv<'life0, 'life1, 'async_trait>( &'life0 mut self, request: &'life1 JsonRpcRequest, ) -> Pin<Box<dyn Future<Output = Result<JsonRpcResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn close<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn reset<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn health_check(&mut self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§