pub struct Machine { /* private fields */ }Expand description
The Pretty HAL Machine
This wraps a serial port connection to an embedded machine, and implements various embedded-hal traits.
Implementations
sourceimpl Machine
impl Machine
pub fn from_port(port: Box<dyn SerialPort>) -> Result<Self, Error>
sourcepub fn set_command_timeout(&mut self, timeout: Duration)
pub fn set_command_timeout(&mut self, timeout: Duration)
Set the timeout for a full command to complete.
This is not a single message timeout, but rather the timeout for a whole command (e.g. an I2C write) to execute. This is currently only checked/set host side, so endless loops on the embedded side are still possible.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Machine
impl Send for Machine
impl !Sync for Machine
impl Unpin for Machine
impl !UnwindSafe for Machine
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more