Skip to main content

TransportWriter

Trait TransportWriter 

Source
pub trait TransportWriter: Send {
    // Required methods
    fn write<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        data: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn end_input<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Async writer half of a split transport.

Writes data to the CLI’s input stream independently of reads.

Required Methods§

Source

fn write<'life0, 'life1, 'async_trait>( &'life0 mut self, data: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Writes a string (typically a JSON line) to the CLI’s input stream.

Source

fn end_input<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Signals that no more input will be sent (closes the input stream).

Implementors§