pub struct McpServer<H: McpHandler> { /* private fields */ }Expand description
MCP server that processes JSON-RPC requests via a transport.
Implementations§
Source§impl<H: McpHandler> McpServer<H>
impl<H: McpHandler> McpServer<H>
Sourcepub fn with_transport(self, transport: impl ServerTransport + 'static) -> Self
pub fn with_transport(self, transport: impl ServerTransport + 'static) -> Self
Set a custom transport.
Sourcepub fn with_middleware(self, mw: impl Middleware) -> Self
pub fn with_middleware(self, mw: impl Middleware) -> Self
Add a middleware to the processing pipeline.
Auto Trait Implementations§
impl<H> Freeze for McpServer<H>where
H: Freeze,
impl<H> !RefUnwindSafe for McpServer<H>
impl<H> Send for McpServer<H>
impl<H> Sync for McpServer<H>
impl<H> Unpin for McpServer<H>where
H: Unpin,
impl<H> UnsafeUnpin for McpServer<H>where
H: UnsafeUnpin,
impl<H> !UnwindSafe for McpServer<H>
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