pub struct McpMethodTable;Expand description
The MCP implementation of MethodTable.
A unit struct: the table is a fixed vocabulary with no configuration, so a value of it is a constant rather than something to build.
Implementations§
Trait Implementations§
Source§impl Clone for McpMethodTable
impl Clone for McpMethodTable
impl Copy for McpMethodTable
Source§impl Debug for McpMethodTable
impl Debug for McpMethodTable
Source§impl Default for McpMethodTable
impl Default for McpMethodTable
Source§impl MethodTable for McpMethodTable
impl MethodTable for McpMethodTable
Source§type RequestParams<'a> = Option<&'a RawValue>
type RequestParams<'a> = Option<&'a RawValue>
The decoded params of a request, which are method- and revision-specific. Read more
Source§type NotificationParams<'a> = Option<&'a RawValue>
type NotificationParams<'a> = Option<&'a RawValue>
The decoded params of a notification.
Source§fn lookup(&self, name: &str) -> Option<McpMethod>
fn lookup(&self, name: &str) -> Option<McpMethod>
The method a name denotes, or
None if this protocol has no such
method — which the router answers with -32601.Source§fn decode_request_params<'a>(
&self,
method: McpMethod,
params: Option<&'a RawValue>,
) -> Result<Self::RequestParams<'a>, RouteError<'a>>
fn decode_request_params<'a>( &self, method: McpMethod, params: Option<&'a RawValue>, ) -> Result<Self::RequestParams<'a>, RouteError<'a>>
Decodes a request’s params. Read more
Source§fn decode_notification_params<'a>(
&self,
method: McpMethod,
params: Option<&'a RawValue>,
) -> Result<Self::NotificationParams<'a>, RouteError<'a>>
fn decode_notification_params<'a>( &self, method: McpMethod, params: Option<&'a RawValue>, ) -> Result<Self::NotificationParams<'a>, RouteError<'a>>
Decodes a notification’s params. Read more
Auto Trait Implementations§
impl Freeze for McpMethodTable
impl RefUnwindSafe for McpMethodTable
impl Send for McpMethodTable
impl Sync for McpMethodTable
impl Unpin for McpMethodTable
impl UnsafeUnpin for McpMethodTable
impl UnwindSafe for McpMethodTable
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