Enum cameleon::ControlError
source · pub enum ControlError {
Busy,
Disconnected,
Io(Error),
Timeout,
NotOpened,
InvalidDevice(Cow<'static, str>),
BufferTooSmall,
InvalidData(Box<dyn Error + Send + Sync>),
}
Expand description
An error type for device control.
Variants§
Busy
The device is busy, may be opened by another application.
Disconnected
The device is disconnected from the host.
Io(Error)
IO error.
Timeout
Timeout has occured when receiving stream payload.
NotOpened
The device is not opened.
InvalidDevice(Cow<'static, str>)
The device doesn’t follow the spceicifation.
BufferTooSmall
Buffer is too small to receive data.
InvalidData(Box<dyn Error + Send + Sync>)
Try to write invalid data to the device, or received data from the device is semantically invalid. e.g. try to write too large data that will overrun register.
Trait Implementations§
source§impl Debug for ControlError
impl Debug for ControlError
source§impl Display for ControlError
impl Display for ControlError
source§impl Error for ControlError
impl Error for ControlError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<ControlError> for CameleonError
impl From<ControlError> for CameleonError
source§fn from(source: ControlError) -> Self
fn from(source: ControlError) -> Self
Converts to this type from the input type.
source§impl From<Error> for ControlError
impl From<Error> for ControlError
source§fn from(err: Error) -> ControlError
fn from(err: Error) -> ControlError
Converts to this type from the input type.
source§impl From<TryFromIntError> for ControlError
impl From<TryFromIntError> for ControlError
source§fn from(e: TryFromIntError) -> Self
fn from(e: TryFromIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ControlError
impl Send for ControlError
impl Sync for ControlError
impl Unpin for ControlError
impl !UnwindSafe for ControlError
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