[][src]Trait cntrlr::io::WriteExt

pub trait WriteExt: Write {
    type AllFuture: Future<Output = Result<(), Self::Error>> + 'a;
    type FmtFuture: Future<Output = Result<(), Self::Error>> + 'a;
    pub fn write_all<'a>(&'a mut self, buf: &'a [u8]) -> Self::AllFuture;
pub fn write_fmt<'a>(&'a mut self, fmt: Arguments<'a>) -> Self::FmtFuture; }

Extended functions for writing bytes

Associated Types

type AllFuture: Future<Output = Result<(), Self::Error>> + 'a[src]

The future for Self::write_all()

type FmtFuture: Future<Output = Result<(), Self::Error>> + 'a[src]

The future for Self::write_fmt()

Loading content...

Required methods

pub fn write_all<'a>(&'a mut self, buf: &'a [u8]) -> Self::AllFuture[src]

Write bytes to the device

This writes exactly buf.len() bytes to the device.

pub fn write_fmt<'a>(&'a mut self, fmt: Arguments<'a>) -> Self::FmtFuture[src]

Write a formatted message to the device

Internally, this will allocate a String to hold the formatted output.

Loading content...

Implementors

impl<T: Write + 'static> WriteExt for T[src]

type AllFuture = impl Future<Output = Result<(), Self::Error>> + 'a

type FmtFuture = impl Future<Output = Result<(), Self::Error>> + 'a

Loading content...