pub struct StdioTransport { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl Transport for StdioTransport
impl Transport for StdioTransport
Source§fn send<'life0, 'async_trait>(
&'life0 self,
message: Message,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 self,
message: Message,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sends a message by writing it to the child process’ stdin
Source§fn receive(&self) -> Pin<Box<dyn Stream<Item = Result<Message, Error>> + Send>>
fn receive(&self) -> Pin<Box<dyn Stream<Item = Result<Message, Error>> + Send>>
Creates a stream of messages received from the child process’ stdout
§Returns
Returns a pinned box containing a stream that yields Result<Message, Error>. The stream will continue until stdin is closed or an error occurs.
§Message Flow
- Messages are read from stdin in the background task created in
new()
- Each message is sent through the broadcast channel
- This stream receives messages from the broadcast channel
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