pub trait SerialDevice {
// Required methods
fn send(&mut self) -> u8;
fn receive(&mut self, byte: u8);
fn allow_slave(&self) -> bool;
fn description(&self) -> String;
fn state(&self) -> String;
}Required Methods§
Sourcefn receive(&mut self, byte: u8)
fn receive(&mut self, byte: u8)
Receives a byte (u8) from the attached serial connection, can be either another device or the host.
Sourcefn allow_slave(&self) -> bool
fn allow_slave(&self) -> bool
Whether the serial device “driver” supports slave mode simulating an external clock source. Or if instead the clock should always be generated by the running device.
Sourcefn description(&self) -> String
fn description(&self) -> String
Returns a short description of the serial device.