pub trait Connection: Send + Sync {
// Required methods
fn tools<'life0, 'life1, 'async_trait>(
&'life0 mut self,
cancel: &'life1 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<Vec<Tool>, McpError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
args: Value,
cancel: &'life2 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, McpError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), McpError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Methods§
fn tools<'life0, 'life1, 'async_trait>(
&'life0 mut self,
cancel: &'life1 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<Vec<Tool>, McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
args: Value,
cancel: &'life2 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".