pub struct AsyncStdioTransport { /* private fields */ }Available on crate feature
stdio only.Expand description
Async-friendly stdio transport with timeout support.
Implementations§
Source§impl AsyncStdioTransport
impl AsyncStdioTransport
Sourcepub fn spawn(command: &str, args: &[String]) -> Result<Self, McpTransportError>
pub fn spawn(command: &str, args: &[String]) -> Result<Self, McpTransportError>
Spawn a new MCP server process.
Sourcepub fn spawn_with_env(
command: &str,
args: &[String],
env: HashMap<String, String>,
) -> Result<Self, McpTransportError>
pub 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 fn stop(&self) -> Result<(), McpTransportError>
pub 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