pub struct ChildProcessConnection { /* private fields */ }Expand description
Active connection to a child MCP server process
Implementations§
Source§impl ChildProcessConnection
impl ChildProcessConnection
Sourcepub async fn send_request(
&mut self,
method: &str,
params: Value,
) -> Result<Value>
pub async fn send_request( &mut self, method: &str, params: Value, ) -> Result<Value>
Send a JSON-RPC request and wait for response
Sourcepub async fn send_notification(
&mut self,
method: &str,
params: Value,
) -> Result<()>
pub async fn send_notification( &mut self, method: &str, params: Value, ) -> Result<()>
Send a notification (no response expected)
Sourcepub async fn initialize(
&mut self,
client_name: &str,
client_version: &str,
) -> Result<Value>
pub async fn initialize( &mut self, client_name: &str, client_version: &str, ) -> Result<Value>
Initialize the MCP connection
Sourcepub async fn send_initialized(&mut self) -> Result<()>
pub async fn send_initialized(&mut self) -> Result<()>
Send initialized notification
Sourcepub async fn list_tools(&mut self) -> Result<Value>
pub async fn list_tools(&mut self) -> Result<Value>
List available tools
Sourcepub fn is_running(&mut self) -> bool
pub fn is_running(&mut self) -> bool
Check if the child process is still running
Auto Trait Implementations§
impl !Freeze for ChildProcessConnection
impl !RefUnwindSafe for ChildProcessConnection
impl !UnwindSafe for ChildProcessConnection
impl Send for ChildProcessConnection
impl Sync for ChildProcessConnection
impl Unpin for ChildProcessConnection
impl UnsafeUnpin for ChildProcessConnection
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