pub trait Serial {
type ReadError;
type WriteError;
// Required methods
fn read_byte_with_timeout(
&mut self,
timeout_ms: u32,
) -> Result<u8, SerialError<Self::ReadError, Self::WriteError>>;
fn write_byte(
&mut self,
byte: u8,
) -> Result<(), SerialError<Self::ReadError, Self::WriteError>>;
}Expand description
The trait that a serial device must implement to support the transport protocol built atop of it.
Required Associated Types§
Sourcetype WriteError
type WriteError
Type of error that can occur while writing.