pub struct StdioDispatcher { /* private fields */ }Expand description
STDIO dispatcher for server-initiated requests
This dispatcher implements the MCP 2025-06-18 specification for stdio transport, allowing servers to make requests to clients (server→client capability).
Implementations§
Source§impl StdioDispatcher
impl StdioDispatcher
Sourcepub fn new(request_tx: UnboundedSender<StdioMessage>) -> Self
pub fn new(request_tx: UnboundedSender<StdioMessage>) -> Self
Create a new STDIO dispatcher
Trait Implementations§
Source§impl Clone for StdioDispatcher
impl Clone for StdioDispatcher
Source§fn clone(&self) -> StdioDispatcher
fn clone(&self) -> StdioDispatcher
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StdioDispatcher
impl Debug for StdioDispatcher
Source§impl ServerRequestDispatcher for StdioDispatcher
impl ServerRequestDispatcher for StdioDispatcher
Source§fn send_elicitation<'life0, 'async_trait>(
&'life0 self,
request: ElicitRequest,
_ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<ElicitResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_elicitation<'life0, 'async_trait>(
&'life0 self,
request: ElicitRequest,
_ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<ElicitResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send an elicitation request to the client
Source§fn send_ping<'life0, 'async_trait>(
&'life0 self,
_request: PingRequest,
_ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<PingResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_ping<'life0, 'async_trait>(
&'life0 self,
_request: PingRequest,
_ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<PingResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a ping request to the client
Source§fn send_create_message<'life0, 'async_trait>(
&'life0 self,
request: CreateMessageRequest,
_ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<CreateMessageResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_create_message<'life0, 'async_trait>(
&'life0 self,
request: CreateMessageRequest,
_ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<CreateMessageResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a sampling create message request to the client
Source§fn send_list_roots<'life0, 'async_trait>(
&'life0 self,
_request: ListRootsRequest,
_ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<ListRootsResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_list_roots<'life0, 'async_trait>(
&'life0 self,
_request: ListRootsRequest,
_ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<ListRootsResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a roots list request to the client
Source§fn supports_bidirectional(&self) -> bool
fn supports_bidirectional(&self) -> bool
Check if client supports bidirectional communication
Source§fn get_client_capabilities<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_client_capabilities<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get client capabilities
Auto Trait Implementations§
impl Freeze for StdioDispatcher
impl !RefUnwindSafe for StdioDispatcher
impl Send for StdioDispatcher
impl Sync for StdioDispatcher
impl Unpin for StdioDispatcher
impl !UnwindSafe for StdioDispatcher
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