Trait contec_protocol::AsyncReadWrite
source · [−]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
type Error: AsErrorSource
type Error: AsErrorSource
Device error
Required Methods
Attempt to read from the object into buf
.