pub struct McpServerStreamableHttp { /* private fields */ }Implementations§
Source§impl McpServerStreamableHttp
impl McpServerStreamableHttp
pub fn new(url: impl AsRef<str>) -> Result<Self, ToolError>
pub fn with_headers(self, headers: HeaderMap) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_tool_prefix(self, prefix: impl Into<String>) -> Self
pub fn with_events_url(self, url: impl AsRef<str>) -> Result<Self, ToolError>
pub fn cache_tools(self, enabled: bool) -> Self
pub fn cache_resources(self, enabled: bool) -> Self
pub fn cache_prompts(self, enabled: bool) -> Self
pub async fn invalidate_tools_cache(&self)
pub async fn invalidate_resources_cache(&self)
pub async fn invalidate_prompts_cache(&self)
pub async fn list_resources(&self) -> Result<Vec<McpResource>, ToolError>
pub async fn list_resource_templates( &self, ) -> Result<Vec<McpResourceTemplate>, ToolError>
pub async fn read_resource(&self, uri: &str) -> Result<Value, ToolError>
pub async fn list_prompts(&self) -> Result<Vec<McpPrompt>, ToolError>
pub async fn get_prompt( &self, name: &str, arguments: Option<Value>, ) -> Result<Vec<McpPromptMessage>, ToolError>
pub async fn sample(&self, params: Value) -> Result<Value, ToolError>
pub async fn notifications(&self) -> Result<McpNotificationStream, ToolError>
Trait Implementations§
Source§impl Clone for McpServerStreamableHttp
impl Clone for McpServerStreamableHttp
Source§fn clone(&self) -> McpServerStreamableHttp
fn clone(&self) -> McpServerStreamableHttp
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for McpServerStreamableHttp
impl Debug for McpServerStreamableHttp
Source§impl<Deps> Toolset<Deps> for McpServerStreamableHttp
impl<Deps> Toolset<Deps> for McpServerStreamableHttp
fn list_tools<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 RunContext<Deps>,
) -> Pin<Box<dyn Future<Output = Result<Vec<ToolDefinition>, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn call_tool<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 RunContext<Deps>,
name: &'life2 str,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn name(&self) -> &str
fn enter<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn exit<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for McpServerStreamableHttp
impl !RefUnwindSafe for McpServerStreamableHttp
impl Send for McpServerStreamableHttp
impl Sync for McpServerStreamableHttp
impl Unpin for McpServerStreamableHttp
impl !UnwindSafe for McpServerStreamableHttp
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