[][src]Enum jaylink::ErrorKind

pub enum ErrorKind {
    Usb,
    DeviceNotFound,
    MultipleDevicesFound,
    MissingCapability,
    Other,
    // some variants omitted
}

List of specific errors that may occur when using this library.

Variants

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::read_capabilities, which returns a Capabilities bitflags struct.

Other

An unspecified error occurred.

Trait Implementations

impl Clone for ErrorKind[src]

impl Copy for ErrorKind[src]

impl Debug for ErrorKind[src]

impl Eq for ErrorKind[src]

impl PartialEq<ErrorKind> for ErrorKind[src]

impl StructuralEq for ErrorKind[src]

impl StructuralPartialEq for ErrorKind[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.