[][src]Trait async_embedded_traits::serial::AsyncRead

pub trait AsyncRead {
    type Error;
    type ReadByteFuture: Future<Output = Result<u8, Self::Error>>;
    type ReadFuture: Future<Output = Result<(), Self::Error>>;
    fn async_read_byte(&mut self) -> Self::ReadByteFuture;
fn async_read<'a>(&'a mut self, data: &'a mut [u8]) -> Self::ReadFuture; }

Read half of a serial interface

Associated Types

type Error

Read error

type ReadByteFuture: Future<Output = Result<u8, Self::Error>>

Read byte future for polling on completion

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

Read future for polling on completion

Loading content...

Required methods

fn async_read_byte(&mut self) -> Self::ReadByteFuture

Reads a single byte from the serial interface

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

Reads an array of bytes from the serial interface

Loading content...

Implementors

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

type Error = S::Error

type ReadByteFuture = DefaultReadByteFuture<'f, S>

type ReadFuture = DefaultReadFuture<'f, S>

Loading content...