pub struct StdioTransport { /* private fields */ }Expand description
Stdio transport for subprocess MCP servers
Implementations§
Source§impl StdioTransport
impl StdioTransport
Sourcepub async fn spawn(
command: &str,
args: &[String],
env: Option<&HashMap<String, String>>,
) -> Result<StdioTransport, Error>
pub async fn spawn( command: &str, args: &[String], env: Option<&HashMap<String, String>>, ) -> Result<StdioTransport, Error>
Spawn a subprocess and connect via stdio
pub async fn request( &self, req: JsonRpcRequest, ) -> Result<JsonRpcResponse, Error>
pub async fn notify(&self, notif: JsonRpcNotification) -> Result<(), Error>
pub async fn close(&self) -> Result<(), Error>
pub fn is_connected(&self) -> bool
Auto Trait Implementations§
impl Freeze for StdioTransport
impl !RefUnwindSafe for StdioTransport
impl Send for StdioTransport
impl Sync for StdioTransport
impl Unpin for StdioTransport
impl !UnwindSafe for StdioTransport
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