pub struct StdioTransport { /* private fields */ }Expand description
Standard I/O transport for MCP protocol
Implements the MCP stdio transport specification:
- Messages are delimited by newlines
- Messages MUST NOT contain embedded newlines
- Messages must be valid UTF-8
- Supports JSON-RPC batching
- Proper error handling with ID preservation
Implementations§
Source§impl StdioTransport
impl StdioTransport
Sourcepub fn with_config(config: StdioConfig) -> Self
pub fn with_config(config: StdioConfig) -> Self
Create a new stdio transport with custom configuration
Sourcepub fn config(&self) -> &StdioConfig
pub fn config(&self) -> &StdioConfig
Get the configuration
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if the transport is running
Trait Implementations§
Source§impl Debug for StdioTransport
impl Debug for StdioTransport
Source§impl Default for StdioTransport
impl Default for StdioTransport
Source§impl Transport for StdioTransport
impl Transport for StdioTransport
fn start<'life0, 'async_trait>(
&'life0 mut self,
handler: RequestHandler,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for StdioTransport
impl RefUnwindSafe for StdioTransport
impl Send for StdioTransport
impl Sync for StdioTransport
impl Unpin for StdioTransport
impl UnwindSafe for StdioTransport
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