pub struct HttpTransportAdapter { /* private fields */ }Available on crate feature
http only.Expand description
Adapter that wraps HttpTransport and implements McpTransport.
Implementations§
Trait Implementations§
Source§impl McpTransport for HttpTransportAdapter
impl McpTransport for HttpTransportAdapter
Source§fn list_tools<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ToolDefinition>, McpTransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_tools<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ToolDefinition>, McpTransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the list of available tools from the server.
Source§fn call_tool<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, McpTransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn call_tool<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, McpTransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute a tool with the given arguments.
Source§fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), McpTransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), McpTransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Perform a clean shutdown of the transport.
Source§fn transport_type(&self) -> TransportTypeId
fn transport_type(&self) -> TransportTypeId
Get the transport type identifier.
Auto Trait Implementations§
impl Freeze for HttpTransportAdapter
impl !RefUnwindSafe for HttpTransportAdapter
impl Send for HttpTransportAdapter
impl Sync for HttpTransportAdapter
impl Unpin for HttpTransportAdapter
impl !UnwindSafe for HttpTransportAdapter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more