Skip to main content

StreamWriteHelpers

Trait StreamWriteHelpers 

Source
pub trait StreamWriteHelpers:
    AsyncWrite
    + Send
    + Unpin {
    // Provided method
    fn write_null_term_string<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        value: &'life1 str,
        encoding: StreamEncoding,
    ) -> Pin<Box<dyn Future<Output = Result<(), SteamError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

Async write helpers.

Provided Methods§

Source

fn write_null_term_string<'life0, 'life1, 'async_trait>( &'life0 mut self, value: &'life1 str, encoding: StreamEncoding, ) -> Pin<Box<dyn Future<Output = Result<(), SteamError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Writes value followed by a null terminator.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<W> StreamWriteHelpers for W
where W: AsyncWrite + Send + Unpin,