pub enum McpMethod {
Show 19 variants
Initialize,
Initialized,
Ping,
ToolsList,
ToolsCall,
ResourcesList,
ResourcesRead,
ResourcesTemplatesList,
ResourcesSubscribe,
ResourcesUnsubscribe,
PromptsList,
PromptsGet,
LoggingSetLevel,
CompletionComplete,
NotificationsToolsListChanged,
NotificationsCancelled,
NotificationsProgress,
Notification(String),
Unknown(String),
}Expand description
Known MCP methods — lets the proxy know exactly what function is being called.
Variants§
Initialize
Initialized
Ping
ToolsList
ToolsCall
ResourcesList
ResourcesRead
ResourcesTemplatesList
ResourcesSubscribe
ResourcesUnsubscribe
PromptsList
PromptsGet
LoggingSetLevel
CompletionComplete
NotificationsToolsListChanged
NotificationsCancelled
NotificationsProgress
Notification(String)
Any notifications/* we don’t have a specific variant for.
Unknown(String)
Anything else.
Implementations§
Source§impl McpMethod
impl McpMethod
Sourcepub fn needs_response_buffering(&self) -> bool
pub fn needs_response_buffering(&self) -> bool
true for methods whose responses may need body rewriting (CSP
injection in meta, widget overlay substitution in contents).
Callers use this to pick buffer-vs-stream strategy pre-forward.
Only the five methods that carry _meta / widget payloads return
true. Everything else — initialize, ping, notifications, prompts,
completion, logging — can safely stream.
Trait Implementations§
impl StructuralPartialEq for McpMethod
Auto Trait Implementations§
impl Freeze for McpMethod
impl RefUnwindSafe for McpMethod
impl Send for McpMethod
impl Sync for McpMethod
impl Unpin for McpMethod
impl UnsafeUnpin for McpMethod
impl UnwindSafe for McpMethod
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