pub struct ListToolsHandler { /* private fields */ }Expand description
Handler for tools/list requests
Implementations§
Trait Implementations§
Source§impl JsonRpcHandler for ListToolsHandler
impl JsonRpcHandler for ListToolsHandler
Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Option<RequestParams>,
session_context: Option<SessionContext>,
) -> Pin<Box<dyn Future<Output = Result<Value, McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Option<RequestParams>,
session_context: Option<SessionContext>,
) -> Pin<Box<dyn Future<Output = Result<Value, McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handle a JSON-RPC method call with optional session context
Returns domain errors only - dispatcher handles conversion to JSON-RPC errors
Source§fn supported_methods(&self) -> Vec<String>
fn supported_methods(&self) -> Vec<String>
List supported methods (optional - used for introspection)
Source§fn handle_notification<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Option<RequestParams>,
session_context: Option<SessionContext>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn handle_notification<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Option<RequestParams>,
session_context: Option<SessionContext>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Handle a JSON-RPC notification with optional session context (optional - default does nothing)
Auto Trait Implementations§
impl Freeze for ListToolsHandler
impl !RefUnwindSafe for ListToolsHandler
impl Send for ListToolsHandler
impl Sync for ListToolsHandler
impl Unpin for ListToolsHandler
impl !UnwindSafe for ListToolsHandler
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.