pub enum Error {
DeviceNotFound,
DfuStatus {
status: Status,
state: State,
},
DfuInvalidDeviceStatus,
DfuSetAddressFailed(Status, State),
UsbContext(Error),
UsbDeviceEnumeration(Error),
UsbDeviceOpen(Error),
UsbKernelDriverDetach(Error),
UsbClaimInterface(Error),
UsbSetAltSetting(Error),
UsbControlTransfer(Error),
}Expand description
Error type
Many of the errors are wrappers around rusb::Error, and are often
somewhat esoteric. Error::usb_stack_error() can be used to retrieve
the underlying USB stack error for further analysis, or test whether the
failure was a USB stack one.
Variants§
DeviceNotFound
DFU Device not found
DfuStatus
DFU status error returned by device
DfuInvalidDeviceStatus
Invalid DFU device status response
DfuSetAddressFailed(Status, State)
DFU set address pointer failed
UsbContext(Error)
UsbDeviceEnumeration(Error)
UsbDeviceOpen(Error)
UsbKernelDriverDetach(Error)
UsbClaimInterface(Error)
UsbSetAltSetting(Error)
UsbControlTransfer(Error)
Implementations§
Trait Implementations§
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin 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