pub struct MessageHandlerBuilder { /* private fields */ }Expand description
Builder for creating message handlers with chained configuration
Implementations§
Source§impl MessageHandlerBuilder
impl MessageHandlerBuilder
Sourcepub fn with_server_info(self, name: String, version: String) -> Self
pub fn with_server_info(self, name: String, version: String) -> Self
Sets the server information for the message handler
Sourcepub fn with_logging(self) -> Self
pub fn with_logging(self) -> Self
Enables logging capabilities in the server
Sourcepub fn with_resources(self, list_changed: bool, subscribe: bool) -> Self
pub fn with_resources(self, list_changed: bool, subscribe: bool) -> Self
Configures resource handling capabilities
list_changed- Whether the server supports resource list change notificationssubscribe- Whether the server supports resource subscription
Sourcepub fn with_tools(self, list_changed: bool) -> Self
pub fn with_tools(self, list_changed: bool) -> Self
Configures tool capabilities
list_changed- Whether the server supports tool list change notifications
Sourcepub fn with_prompts(self, list_changed: bool) -> Self
pub fn with_prompts(self, list_changed: bool) -> Self
Configures prompt capabilities
list_changed- Whether the server supports prompt list change notifications
Sourcepub fn build(self) -> Result<DefaultMessageHandler>
pub fn build(self) -> Result<DefaultMessageHandler>
Builds the message handler with the configured settings
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MessageHandlerBuilder
impl RefUnwindSafe for MessageHandlerBuilder
impl Send for MessageHandlerBuilder
impl Sync for MessageHandlerBuilder
impl Unpin for MessageHandlerBuilder
impl UnsafeUnpin for MessageHandlerBuilder
impl UnwindSafe for MessageHandlerBuilder
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