pub struct CapabilitiesBuilder { /* private fields */ }
Expand description
Builder for configuring and constructing capabilities
Implementations§
Source§impl CapabilitiesBuilder
impl CapabilitiesBuilder
pub fn new() -> Self
Sourcepub fn with_tools(self, list_changed: bool) -> Self
pub fn with_tools(self, list_changed: bool) -> Self
Add multiple tools to the router
Sourcepub fn with_prompts(self, list_changed: bool) -> Self
pub fn with_prompts(self, list_changed: bool) -> Self
Enable prompts capability
Sourcepub fn with_resources(self, subscribe: bool, list_changed: bool) -> Self
pub fn with_resources(self, subscribe: bool, list_changed: bool) -> Self
Enable resources capability
Sourcepub fn build(self) -> ServerCapabilities
pub fn build(self) -> ServerCapabilities
Build the router with automatic capability inference
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CapabilitiesBuilder
impl RefUnwindSafe for CapabilitiesBuilder
impl Send for CapabilitiesBuilder
impl Sync for CapabilitiesBuilder
impl Unpin for CapabilitiesBuilder
impl UnwindSafe for CapabilitiesBuilder
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