pub trait AsyncRxFrameIo {
type Frame;
type Error;
// Required methods
async fn recv(&mut self) -> Result<Self::Frame, Self::Error>;
async fn recv_timeout(
&mut self,
timeout: Duration,
) -> Result<Self::Frame, Self::Error>;
async fn wait_not_empty(&mut self) -> Result<(), Self::Error>;
}Expand description
Receive-side (async) CAN frame I/O.
This is the async equivalent of RxFrameIo.
Required Associated Types§
Required Methods§
Sourceasync fn recv_timeout(
&mut self,
timeout: Duration,
) -> Result<Self::Frame, Self::Error>
async fn recv_timeout( &mut self, timeout: Duration, ) -> Result<Self::Frame, Self::Error>
Receive a frame asynchronously, waiting up to timeout.
Implementations that cannot support timeouts may treat this as AsyncRxFrameIo::recv.
Sourceasync fn wait_not_empty(&mut self) -> Result<(), Self::Error>
async fn wait_not_empty(&mut self) -> Result<(), Self::Error>
Asynchronously wait until the receive queue is non-empty.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.