pub trait CompositeHandler: Send + Sync {
// Provided methods
fn as_tool_handler(&self) -> Option<&dyn ToolHandler> { ... }
fn as_prompt_handler(&self) -> Option<&dyn PromptHandler> { ... }
fn as_resource_handler(&self) -> Option<&dyn ResourceHandler> { ... }
fn as_sampling_handler(&self) -> Option<&dyn SamplingHandler> { ... }
fn as_logging_handler(&self) -> Option<&dyn LoggingHandler> { ... }
fn as_elicitation_handler(&self) -> Option<&dyn ElicitationHandler> { ... }
fn as_completion_handler(&self) -> Option<&dyn CompletionHandler> { ... }
fn as_resource_template_handler(
&self,
) -> Option<&dyn ResourceTemplateHandler> { ... }
fn as_ping_handler(&self) -> Option<&dyn PingHandler> { ... }
}Expand description
Composite handler that can handle multiple types of requests
Provided Methods§
Sourcefn as_tool_handler(&self) -> Option<&dyn ToolHandler>
fn as_tool_handler(&self) -> Option<&dyn ToolHandler>
Get tool handler if this composite handles tools
Sourcefn as_prompt_handler(&self) -> Option<&dyn PromptHandler>
fn as_prompt_handler(&self) -> Option<&dyn PromptHandler>
Get prompt handler if this composite handles prompts
Sourcefn as_resource_handler(&self) -> Option<&dyn ResourceHandler>
fn as_resource_handler(&self) -> Option<&dyn ResourceHandler>
Get resource handler if this composite handles resources
Sourcefn as_sampling_handler(&self) -> Option<&dyn SamplingHandler>
fn as_sampling_handler(&self) -> Option<&dyn SamplingHandler>
Get sampling handler if this composite handles sampling
Sourcefn as_logging_handler(&self) -> Option<&dyn LoggingHandler>
fn as_logging_handler(&self) -> Option<&dyn LoggingHandler>
Get logging handler if this composite handles logging
Sourcefn as_elicitation_handler(&self) -> Option<&dyn ElicitationHandler>
fn as_elicitation_handler(&self) -> Option<&dyn ElicitationHandler>
Get elicitation handler if this composite handles elicitation
Sourcefn as_completion_handler(&self) -> Option<&dyn CompletionHandler>
fn as_completion_handler(&self) -> Option<&dyn CompletionHandler>
Get completion handler if this composite handles completion
Sourcefn as_resource_template_handler(&self) -> Option<&dyn ResourceTemplateHandler>
fn as_resource_template_handler(&self) -> Option<&dyn ResourceTemplateHandler>
Get resource template handler if this composite handles resource templates
Sourcefn as_ping_handler(&self) -> Option<&dyn PingHandler>
fn as_ping_handler(&self) -> Option<&dyn PingHandler>
Get ping handler if this composite handles ping