pub struct McpServerBuilder { /* private fields */ }Expand description
Builder for McpServer
Implementations§
Source§impl McpServerBuilder
impl McpServerBuilder
pub fn new() -> Self
pub fn name(self, name: impl Into<String>) -> Self
pub fn version(self, version: impl Into<String>) -> Self
pub fn instructions(self, instructions: impl Into<String>) -> Self
pub fn enable_resources(self, enable: bool) -> Self
pub fn enable_prompts(self, enable: bool) -> Self
pub fn add_tool(self, handler: impl ToolHandler + 'static) -> Self
pub fn resource_handler(self, handler: impl ResourceHandler + 'static) -> Self
pub fn prompt_handler(self, handler: impl PromptHandler + 'static) -> Self
pub fn build(self) -> Arc<McpServer>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for McpServerBuilder
impl !RefUnwindSafe for McpServerBuilder
impl Send for McpServerBuilder
impl Sync for McpServerBuilder
impl Unpin for McpServerBuilder
impl UnsafeUnpin for McpServerBuilder
impl !UnwindSafe for McpServerBuilder
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