#[non_exhaustive]
pub enum ErrorKind {
Usb,
DeviceNotFound,
MultipleDevicesFound,
MissingCapability,
InterfaceNotSupported,
Other,
}
Expand description
List of specific errors that may occur when using this library.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Usb
A USB transport error occurred.
This variant is used for all errors reported by the operating system when performing a USB operation. It may indicate that the USB device was unplugged, that another application or an operating system driver is currently using it, or that the current user does not have permission to access it.
DeviceNotFound
No (matching) J-Link device was found.
This error occurs when calling JayLink::open_by_serial
while no J-Link device is connected
(or no device matching the serial number is connected).
MultipleDevicesFound
Automatic device connection failed because multiple devices were found.
This error occurs when calling JayLink::open_by_serial
without a serial number while
multiple J-Link devices are connected. This library will refuse to “guess” a device and
requires specifying a serial number in this case. The scan_usb
function can also be used
to find a specific device to connect to.
MissingCapability
A operation was attempted that is not supported by the probe.
Some operations are not supported by all firmware/hardware versions, and are instead advertised as optional capability bits. This error occurs when the capability bit for an operation isn’t set when that operation is attempted.
Capabilities can be read by calling JayLink::capabilities
, which returns a
Capabilities
bitflags struct.
InterfaceNotSupported
The device does not support the selected target interface.
Other
An unspecified error occurred.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ErrorKind
impl UnwindSafe for ErrorKind
Blanket Implementations
Mutably borrows from an owned value. Read more