pub struct AsyncStdioTransport { /* private fields */ }Available on crate feature
client only.Expand description
Async-friendly stdio transport with timeout support.
This is now a wrapper around TokioStdioTransport for backwards compatibility.
Implementations§
Source§impl AsyncStdioTransport
impl AsyncStdioTransport
Sourcepub async fn spawn(
command: &str,
args: &[String],
) -> Result<Self, McpTransportError>
pub async fn spawn( command: &str, args: &[String], ) -> Result<Self, McpTransportError>
Spawn a new MCP server process.
Sourcepub async fn spawn_with_env(
command: &str,
args: &[String],
env: HashMap<String, String>,
) -> Result<Self, McpTransportError>
pub async fn spawn_with_env( command: &str, args: &[String], env: HashMap<String, String>, ) -> Result<Self, McpTransportError>
Spawn with environment variables.
Sourcepub async fn send_request_with_timeout(
&self,
method: &str,
params: Option<Value>,
timeout_duration: Duration,
) -> Result<Value, McpTransportError>
pub async fn send_request_with_timeout( &self, method: &str, params: Option<Value>, timeout_duration: Duration, ) -> Result<Value, McpTransportError>
Send a request with a timeout.
Sourcepub async fn stop(&self) -> Result<(), McpTransportError>
pub async fn stop(&self) -> Result<(), McpTransportError>
Stop the transport.
Auto Trait Implementations§
impl Freeze for AsyncStdioTransport
impl !RefUnwindSafe for AsyncStdioTransport
impl Send for AsyncStdioTransport
impl Sync for AsyncStdioTransport
impl Unpin for AsyncStdioTransport
impl !UnwindSafe for AsyncStdioTransport
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