pub trait ReconnectableTransport: Transport {
// Required methods
fn reconnect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = McpResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_reconnect_config(&mut self, config: ReconnectConfig);
fn connection_state(&self) -> ConnectionState;
}
Expand description
Trait for transports that support reconnection
Required Methods§
Sourcefn reconnect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = McpResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reconnect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = McpResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn set_reconnect_config(&mut self, config: ReconnectConfig)
fn set_reconnect_config(&mut self, config: ReconnectConfig)
Sourcefn connection_state(&self) -> ConnectionState
fn connection_state(&self) -> ConnectionState
Get the current connection state