[][src]Trait cntrlr::io::Read

pub trait Read {
    type Error: Debug;
    type Future: Future<Output = Result<usize, Self::Error>> + 'a;
    pub fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Self::Future;
}

Allows reading bytes from a source

Associated Types

type Error: Debug[src]

The error type

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

The future for Self::read()

Loading content...

Required methods

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

Read bytes from the device

This reads as many bytes as are currently available, up to buf.len(), and returns the number of bytes written.

Loading content...

Implementors

impl<M, T, R, const N: usize> Read for cntrlr::hw::board::teensy_common::io::Serial<M, T, R, N> where
    M: 'static,
    T: 'static,
    R: UartRx<M, N> + 'static, 
[src]

type Error = SerialError

type Future = impl Future<Output = Result<usize, Self::Error>> + 'a

impl<T, R, const N: usize> Read for cntrlr::hw::board::red_v::io::Serial<T, R, N> where
    T: 'static,
    R: UartRx<Fe310G002, N> + 'static, 
[src]

This is supported on board="red_v" only.

type Error = SerialError

type Future = impl Future<Output = Result<usize, Self::Error>>

Loading content...