pub struct ProtocolBuilder { /* private fields */ }
Implementations§
Source§impl ProtocolBuilder
impl ProtocolBuilder
pub fn new(options: Option<ProtocolOptions>) -> Self
pub fn with_request_handler( self, method: &str, handler: RequestHandlerFn, ) -> Self
pub fn with_notification_handler( self, method: &str, handler: Box<dyn Fn(JsonRpcNotification) -> Pin<Box<dyn Future<Output = Result<(), McpError>> + Send>> + Send + Sync>, ) -> Self
pub fn build(self) -> Protocol
Auto Trait Implementations§
impl Freeze for ProtocolBuilder
impl !RefUnwindSafe for ProtocolBuilder
impl Send for ProtocolBuilder
impl Sync for ProtocolBuilder
impl Unpin for ProtocolBuilder
impl !UnwindSafe for ProtocolBuilder
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