pub trait AsyncReadWrite {
    type Error: AsErrorSource;

    fn poll_read(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
        buf: &mut [u8]
    ) -> Poll<Result<usize, Self::Error>>; fn poll_write(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
        buf: &[u8]
    ) -> Poll<Result<usize, Self::Error>>; }
Expand description

Trait that must be implemented by the serial port that enables async communication

Required Associated Types

Device error

Required Methods

Attempt to read from the object into buf.

Attempt to write bytes from buf into the object.

Implementors