pub struct McpProtocolHandler { /* private fields */ }Expand description
MCP Protocol Handler - Integrates with protocol_transport_core
Implementations§
Source§impl McpProtocolHandler
impl McpProtocolHandler
Sourcepub fn with_capabilities(self, capabilities: ServerCapabilities) -> Self
pub fn with_capabilities(self, capabilities: ServerCapabilities) -> Self
Configure server capabilities
Sourcepub fn with_auth_handler<H: AuthHandler + 'static>(self, handler: H) -> Self
pub fn with_auth_handler<H: AuthHandler + 'static>(self, handler: H) -> Self
Configure authentication handler
Sourcepub fn with_tool_provider<P: ToolProvider + 'static>(self, provider: P) -> Self
pub fn with_tool_provider<P: ToolProvider + 'static>(self, provider: P) -> Self
Configure tool provider
Sourcepub fn with_query_mode(self, query_mode: QueryMode) -> Self
pub fn with_query_mode(self, query_mode: QueryMode) -> Self
Configure query mode
Trait Implementations§
Source§impl AsyncProtocolHandler for McpProtocolHandler
impl AsyncProtocolHandler for McpProtocolHandler
Source§fn protocol_name(&self) -> &'static str
fn protocol_name(&self) -> &'static str
Protocol name (e.g., “A2A”, “MCP”, “REST”)
Source§fn handle_request_sync(
&self,
request: UniversalRequest,
) -> Result<UniversalResponse, ProtocolError>
fn handle_request_sync( &self, request: UniversalRequest, ) -> Result<UniversalResponse, ProtocolError>
Handle request synchronously (async operations handled internally)
Source§impl Default for McpProtocolHandler
impl Default for McpProtocolHandler
Source§impl ProtocolHandler for McpProtocolHandler
impl ProtocolHandler for McpProtocolHandler
type Request = JsonRpcRequest
type Response = JsonRpcResponse
type Error = ProtocolError
Source§fn protocol_name(&self) -> &'static str
fn protocol_name(&self) -> &'static str
Protocol name (e.g., “A2A”, “MCP”, “REST”)
Source§fn encode_request(
&self,
request: &Self::Request,
) -> Result<UniversalRequest, Self::Error>
fn encode_request( &self, request: &Self::Request, ) -> Result<UniversalRequest, Self::Error>
Serialize protocol request to universal format
Source§fn decode_request(
&self,
universal: &UniversalRequest,
) -> Result<Self::Request, Self::Error>
fn decode_request( &self, universal: &UniversalRequest, ) -> Result<Self::Request, Self::Error>
Deserialize universal request to protocol format
Source§fn encode_response(
&self,
response: &Self::Response,
) -> Result<UniversalResponse, Self::Error>
fn encode_response( &self, response: &Self::Response, ) -> Result<UniversalResponse, Self::Error>
Serialize protocol response to universal format
Source§fn decode_response(
&self,
universal: &UniversalResponse,
) -> Result<Self::Response, Self::Error>
fn decode_response( &self, universal: &UniversalResponse, ) -> Result<Self::Response, Self::Error>
Deserialize universal response to protocol format
Auto Trait Implementations§
impl Freeze for McpProtocolHandler
impl !RefUnwindSafe for McpProtocolHandler
impl Send for McpProtocolHandler
impl Sync for McpProtocolHandler
impl Unpin for McpProtocolHandler
impl UnsafeUnpin for McpProtocolHandler
impl !UnwindSafe for McpProtocolHandler
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