pub enum DeviceError {
IoError(Error),
ShdlcError(TranslationError),
StateResponse(StateResponseError),
PortError(Error),
InvalidChecksum(u8, u8),
InvalidString,
}
Expand description
An aggregate error type that covers every error that can occur when attempting to communicate with the mass flow controller.
Variants§
IoError(Error)
An error when writing data or reading data from the device.
ShdlcError(TranslationError)
StateResponse(StateResponseError)
PortError(Error)
InvalidChecksum(u8, u8)
An Invalid Checksum. The first value of the tuple is the recivied checksum and the second value was the expected checksum.
InvalidString
An invalid string was sent from the device. Either missing the null terminator byte or was not valid ASCII.
Trait Implementations§
Source§impl Debug for DeviceError
impl Debug for DeviceError
Source§impl Display for DeviceError
impl Display for DeviceError
Source§impl From<CapacityError> for DeviceError
impl From<CapacityError> for DeviceError
Source§fn from(_: CapacityError) -> Self
fn from(_: CapacityError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for DeviceError
impl From<Error> for DeviceError
Source§impl From<Error> for DeviceError
impl From<Error> for DeviceError
Source§impl From<StateResponseError> for DeviceError
impl From<StateResponseError> for DeviceError
Source§fn from(value: StateResponseError) -> Self
fn from(value: StateResponseError) -> Self
Converts to this type from the input type.
Source§impl From<TranslationError> for DeviceError
impl From<TranslationError> for DeviceError
Source§fn from(value: TranslationError) -> Self
fn from(value: TranslationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DeviceError
impl !RefUnwindSafe for DeviceError
impl Send for DeviceError
impl Sync for DeviceError
impl Unpin for DeviceError
impl !UnwindSafe for DeviceError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more