pub struct StdioTransport { /* private fields */ }Expand description
Transport for reading/writing JSON-RPC messages.
Implementations§
Source§impl StdioTransport
impl StdioTransport
Sourcepub fn read_message(&mut self) -> Result<Option<IncomingMessage>>
pub fn read_message(&mut self) -> Result<Option<IncomingMessage>>
Read a single JSON-RPC message from the transport.
Sourcepub fn write_response(&mut self, response: &JsonRpcResponse) -> Result<()>
pub fn write_response(&mut self, response: &JsonRpcResponse) -> Result<()>
Write a JSON-RPC response to the transport.
Sourcepub fn write_notification(
&mut self,
notification: &JsonRpcNotification,
) -> Result<()>
pub fn write_notification( &mut self, notification: &JsonRpcNotification, ) -> Result<()>
Write a JSON-RPC notification to the transport.
Auto Trait Implementations§
impl Freeze for StdioTransport
impl !RefUnwindSafe for StdioTransport
impl Send for StdioTransport
impl !Sync for StdioTransport
impl Unpin for StdioTransport
impl UnsafeUnpin 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