pub struct McpStdioProcess { /* private fields */ }Implementations§
Source§impl McpStdioProcess
impl McpStdioProcess
pub fn spawn(transport: &McpStdioTransport) -> Result<Self>
pub async fn write_all(&mut self, bytes: &[u8]) -> Result<()>
pub async fn flush(&mut self) -> Result<()>
pub async fn write_line(&mut self, line: &str) -> Result<()>
pub async fn read_line(&mut self) -> Result<String>
pub async fn read_available(&mut self) -> Result<Vec<u8>>
pub async fn write_frame(&mut self, payload: &[u8]) -> Result<()>
pub async fn read_frame(&mut self) -> Result<Vec<u8>>
pub async fn write_jsonrpc_message<T: Serialize>( &mut self, message: &T, ) -> Result<()>
pub async fn read_jsonrpc_message<T: DeserializeOwned>(&mut self) -> Result<T>
pub async fn send_request<T: Serialize>( &mut self, request: &JsonRpcRequest<T>, ) -> Result<()>
pub async fn read_response<T: DeserializeOwned>( &mut self, ) -> Result<JsonRpcResponse<T>>
pub async fn request<TParams: Serialize, TResult: DeserializeOwned>( &mut self, id: JsonRpcId, method: impl Into<String>, params: Option<TParams>, ) -> Result<JsonRpcResponse<TResult>>
pub async fn initialize( &mut self, id: JsonRpcId, params: McpInitializeParams, ) -> Result<JsonRpcResponse<McpInitializeResult>>
pub async fn list_tools( &mut self, id: JsonRpcId, params: Option<McpListToolsParams>, ) -> Result<JsonRpcResponse<McpListToolsResult>>
pub async fn call_tool( &mut self, id: JsonRpcId, params: McpToolCallParams, ) -> Result<JsonRpcResponse<McpToolCallResult>>
pub async fn list_resources( &mut self, id: JsonRpcId, params: Option<McpListResourcesParams>, ) -> Result<JsonRpcResponse<McpListResourcesResult>>
pub async fn read_resource( &mut self, id: JsonRpcId, params: McpReadResourceParams, ) -> Result<JsonRpcResponse<McpReadResourceResult>>
pub async fn terminate(&mut self) -> Result<()>
pub async fn wait(&mut self) -> Result<ExitStatus>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for McpStdioProcess
impl !RefUnwindSafe for McpStdioProcess
impl Send for McpStdioProcess
impl Sync for McpStdioProcess
impl Unpin for McpStdioProcess
impl UnsafeUnpin for McpStdioProcess
impl !UnwindSafe for McpStdioProcess
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