Trait Write

Source
pub trait Write {
    // Required method
    fn write(&mut self, buf: &[u8]) -> Result<(), Error>;

    // Provided methods
    fn write_all_blocking(&mut self, buf: &[u8]) -> Result<(), Error> { ... }
    fn write_all<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        buf: &'life1 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: Send + 'async_trait { ... }
}

Required Methods§

Source

fn write(&mut self, buf: &[u8]) -> Result<(), Error>

Write data to the device.

Provided Methods§

Source

fn write_all_blocking(&mut self, buf: &[u8]) -> Result<(), Error>

Source

fn write_all<'life0, 'life1, 'async_trait>( &'life0 mut self, buf: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: Send + 'async_trait,

Implementors§