pub enum Error {
Show 13 variants
PermissionDenied {
path: String,
},
DeviceNotFound {
path: String,
},
MissingReport {
report_name: String,
},
LampIdMismatch {
expected: u16,
got: u16,
},
LampIdOutOfRange {
lamp_id: u16,
lamp_count: u16,
},
DuplicateLampId {
lamp_id: u16,
},
NoAutonomousMode,
NoMultiUpdate,
TruncatedReport {
report_name: &'static str,
expected: usize,
got: usize,
},
UnsupportedReportType,
InvalidArgument(String),
Io(Error),
Arg(Error),
}Expand description
All errors that can occur in hid-rgb-ctl.
Variants§
PermissionDenied
Permission denied accessing a hidraw device.
DeviceNotFound
The hidraw device path does not exist.
MissingReport
A required HID report type is missing from the device descriptor.
LampIdMismatch
LampAttributesResponseReport returned an unexpected LampId.
LampIdOutOfRange
Caller specified a LampId that exceeds the device’s LampCount.
DuplicateLampId
Caller specified the same LampId in multiple update slots.
NoAutonomousMode
The auto command was used on a non-LampArray device.
NoMultiUpdate
The set-lamp command was used on a non-LampArray device.
TruncatedReport
Device returned a report shorter than expected.
UnsupportedReportType
Attempted to write to an Input-only report (device-to-host).
InvalidArgument(String)
Invalid subcommand or argument.
Io(Error)
Wrapped I/O error.
Arg(Error)
Wrapped lexopt argument parsing error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
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