pub struct BasicRequestHandler { /* private fields */ }
Expand description
Basic implementation of RequestHandler that provides core MCP functionality
Implementations§
Trait Implementations§
Source§impl RequestHandler for BasicRequestHandler
impl RequestHandler for BasicRequestHandler
Source§fn handle_request<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Option<Value>,
) -> Pin<Box<dyn Future<Output = Result<Value, McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_request<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Option<Value>,
) -> Pin<Box<dyn Future<Output = Result<Value, McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle an incoming JSON-RPC request
Source§fn handle_notification<'life0, 'life1, 'async_trait>(
&'life0 self,
_method: &'life1 str,
_params: Option<Value>,
) -> Pin<Box<dyn Future<Output = Result<(), McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_notification<'life0, 'life1, 'async_trait>(
&'life0 self,
_method: &'life1 str,
_params: Option<Value>,
) -> Pin<Box<dyn Future<Output = Result<(), McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle an incoming JSON-RPC notification
Source§fn get_capabilities(&self) -> ServerCapabilities
fn get_capabilities(&self) -> ServerCapabilities
Get the server’s capabilities
Auto Trait Implementations§
impl Freeze for BasicRequestHandler
impl RefUnwindSafe for BasicRequestHandler
impl Send for BasicRequestHandler
impl Sync for BasicRequestHandler
impl Unpin for BasicRequestHandler
impl UnwindSafe for BasicRequestHandler
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