pub struct McpHttpClient { /* private fields */ }Implementations§
Source§impl McpHttpClient
impl McpHttpClient
pub fn new( server_name: String, url: String, headers: BTreeMap<String, String>, ) -> Result<Self, String>
pub fn list_tools(&mut self) -> Result<Vec<McpToolSpec>, String>
pub fn call_tool( &mut self, tool_name: &str, arguments: Value, ) -> Result<String, String>
pub fn list_resources(&mut self) -> Result<Vec<McpResource>, String>
pub fn read_resource( &mut self, uri: &str, ) -> Result<Vec<McpResourceContent>, String>
pub fn is_initialized(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for McpHttpClient
impl !RefUnwindSafe for McpHttpClient
impl Send for McpHttpClient
impl Sync for McpHttpClient
impl Unpin for McpHttpClient
impl UnsafeUnpin for McpHttpClient
impl !UnwindSafe for McpHttpClient
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