pub struct CratesDocsHandlerCore { /* private fields */ }Expand description
Core handler implementation (provides more control)
Implementations§
Source§impl CratesDocsHandlerCore
impl CratesDocsHandlerCore
Sourcepub fn new(server: Arc<CratesDocsServer>) -> Self
pub fn new(server: Arc<CratesDocsServer>) -> Self
Create a new core handler
Trait Implementations§
Source§impl ServerHandlerCore for CratesDocsHandlerCore
impl ServerHandlerCore for CratesDocsHandlerCore
Source§fn handle_request<'life0, 'async_trait>(
&'life0 self,
request: RequestFromClient,
_runtime: Arc<dyn McpServer>,
) -> Pin<Box<dyn Future<Output = Result<ResultFromServer, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_request<'life0, 'async_trait>(
&'life0 self,
request: RequestFromClient,
_runtime: Arc<dyn McpServer>,
) -> Pin<Box<dyn Future<Output = Result<ResultFromServer, RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle request
Source§fn handle_notification<'life0, 'async_trait>(
&'life0 self,
_notification: NotificationFromClient,
_runtime: Arc<dyn McpServer>,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_notification<'life0, 'async_trait>(
&'life0 self,
_notification: NotificationFromClient,
_runtime: Arc<dyn McpServer>,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle notification
Source§fn handle_error<'life0, 'life1, 'async_trait>(
&'life0 self,
_error: &'life1 RpcError,
_runtime: Arc<dyn McpServer>,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_error<'life0, 'life1, 'async_trait>(
&'life0 self,
_error: &'life1 RpcError,
_runtime: Arc<dyn McpServer>,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle error
Source§fn on_initialized<'life0, 'async_trait>(
&'life0 self,
_runtime: Arc<dyn McpServer>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn on_initialized<'life0, 'async_trait>(
&'life0 self,
_runtime: Arc<dyn McpServer>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Invoked when the server finishes initialization and receives an
initialized_notification from the client. Read moreAuto Trait Implementations§
impl Freeze for CratesDocsHandlerCore
impl !RefUnwindSafe for CratesDocsHandlerCore
impl Send for CratesDocsHandlerCore
impl Sync for CratesDocsHandlerCore
impl Unpin for CratesDocsHandlerCore
impl UnsafeUnpin for CratesDocsHandlerCore
impl !UnwindSafe for CratesDocsHandlerCore
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