pub struct McpClient { /* private fields */ }Implementations§
Source§impl McpClient
impl McpClient
pub async fn connect(config: McpClientConfig) -> Result<Self>
pub fn peer(&self) -> &Peer<RoleClient>
pub fn is_closed(&self) -> bool
pub async fn list_tools(&self) -> Result<Vec<McpToolDefinition>>
pub async fn call_tool( &self, name: impl Into<String>, arguments: Option<Map<String, Value>>, ) -> Result<McpToolResult>
pub async fn list_resources(&self) -> Result<Vec<McpResource>>
pub async fn list_resource_templates(&self) -> Result<Vec<McpResourceTemplate>>
pub async fn read_resource( &self, uri: impl Into<String>, ) -> Result<McpReadResourceResult>
pub async fn list_prompts(&self) -> Result<Vec<McpPrompt>>
pub async fn get_prompt( &self, name: impl Into<String>, arguments: Option<Map<String, Value>>, ) -> Result<McpGetPromptResult>
pub async fn close(&mut self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for McpClient
impl !UnwindSafe for McpClient
impl Freeze for McpClient
impl Send for McpClient
impl Sync for McpClient
impl Unpin for McpClient
impl UnsafeUnpin for McpClient
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