pub struct AgentMcpHandlerBuilder { /* private fields */ }Expand description
Builder for AgentMcpHandler
Implementations§
Source§impl AgentMcpHandlerBuilder
impl AgentMcpHandlerBuilder
pub fn new(name: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
pub fn capability(self, capability: impl Into<String>) -> Self
pub fn capabilities(self, capabilities: Vec<String>) -> Self
pub fn config(self, config: AgentMcpConfig) -> Self
pub fn name_prefix(self, prefix: impl Into<String>) -> Self
pub fn include_metadata(self, include: bool) -> Self
pub fn include_tools_used(self, include: bool) -> Self
Sourcepub fn handler<F, Fut>(self, handler: F) -> AgentMcpHandlerwhere
F: Fn(AgentMcpInput) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<AgentMcpOutput, String>> + Send + 'static,
pub fn handler<F, Fut>(self, handler: F) -> AgentMcpHandlerwhere
F: Fn(AgentMcpInput) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<AgentMcpOutput, String>> + Send + 'static,
Build with a handler function
Auto Trait Implementations§
impl Freeze for AgentMcpHandlerBuilder
impl RefUnwindSafe for AgentMcpHandlerBuilder
impl Send for AgentMcpHandlerBuilder
impl Sync for AgentMcpHandlerBuilder
impl Unpin for AgentMcpHandlerBuilder
impl UnsafeUnpin for AgentMcpHandlerBuilder
impl UnwindSafe for AgentMcpHandlerBuilder
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