[][src]Trait async_embedded_traits::serial::AsyncWrite

pub trait AsyncWrite {
    type Error;
    type WriteByteFuture: Future<Output = Result<(), Self::Error>>;
    type WriteFuture: Future<Output = Result<(), Self::Error>>;
    type FlushFuture: Future<Output = Result<(), Self::Error>>;
    fn async_write_byte(&mut self, byte: u8) -> Self::WriteByteFuture;
fn async_write<'a>(&'a mut self, data: &'a [u8]) -> Self::WriteFuture;
fn async_flush(&mut self) -> Self::FlushFuture; }

Write half of a serial interface

Associated Types

type Error

Write error

type WriteByteFuture: Future<Output = Result<(), Self::Error>>

Write byte future for polling on completion

type WriteFuture: Future<Output = Result<(), Self::Error>>

Write future for polling on completion

type FlushFuture: Future<Output = Result<(), Self::Error>>

Flush future for polling on completion

Loading content...

Required methods

fn async_write_byte(&mut self, byte: u8) -> Self::WriteByteFuture

Writes a single byte to the serial interface When the future completes, data may not be fully transmitted. Call flush to ensure that no data is left buffered.

fn async_write<'a>(&'a mut self, data: &'a [u8]) -> Self::WriteFuture

Writes an array of bytes to the serial interface When the future completes, data may not be fully transmitted. Call flush to ensure that no data is left buffered.

fn async_flush(&mut self) -> Self::FlushFuture

Ensures that none of the previously written words are still buffered

Loading content...

Implementors

impl<S: Default + 'static> AsyncWrite for S[src]

type Error = S::Error

type WriteByteFuture = DefaultWriteByteFuture<'f, S>

type WriteFuture = DefaultWriteFuture<'f, S>

type FlushFuture = DefaultFlushFuture<'f, S>

Loading content...