pub enum NativeError {
NotCompiled(DeviceType),
MissingDeviceId(&'static str),
Gone(String),
Hid(HidError),
Io(Error),
Usb(Error),
Serial(Error),
SerialSysfsMissing,
Probe {
device_type: DeviceType,
source: HWIDeviceError,
},
}Expand description
A failure while discovering, opening, or probing a native device.
Variants§
NotCompiled(DeviceType)
Support for the requested device type is disabled in this build.
Tuple Fields
§
0: DeviceTypeThe requested device type.
MissingDeviceId(&'static str)
A device-identifier constant required by discovery is unset.
Gone(String)
Listed on the bus, but no longer there when it was opened.
Hid(HidError)
Native HID enumeration or opening failed.
Io(Error)
A native channel or filesystem operation failed.
Usb(Error)
Native USB enumeration failed.
Serial(Error)
Serial-port enumeration or opening failed.
SerialSysfsMissing
Linux serial enumeration cannot access /sys/class/tty.
Probe
The port opened, but the device did not answer as the expected type.
Fields
§
device_type: DeviceTypeThe device type expected on the opened channel.
§
source: HWIDeviceErrorThe failed protocol probe.
Implementations§
Trait Implementations§
Source§impl Debug for NativeError
impl Debug for NativeError
Source§impl Display for NativeError
impl Display for NativeError
Source§impl Error for NativeError
impl Error for NativeError
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()
Source§impl ErrorKindOf for NativeError
impl ErrorKindOf for NativeError
Source§fn error_kind(&self) -> ErrorKind
fn error_kind(&self) -> ErrorKind
Returns the error’s kind.
Source§impl From<Error> for NativeError
impl From<Error> for NativeError
Source§fn from(source: Error) -> NativeError
fn from(source: Error) -> NativeError
Converts to this type from the input type.
Source§impl From<Error> for NativeError
impl From<Error> for NativeError
Source§fn from(source: Error) -> NativeError
fn from(source: Error) -> NativeError
Converts to this type from the input type.
Source§impl From<Error> for NativeError
impl From<Error> for NativeError
Source§fn from(source: Error) -> NativeError
fn from(source: Error) -> NativeError
Converts to this type from the input type.
Source§impl From<HidError> for NativeError
impl From<HidError> for NativeError
Source§fn from(source: HidError) -> NativeError
fn from(source: HidError) -> NativeError
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for NativeError
impl !UnwindSafe for NativeError
impl Freeze for NativeError
impl Send for NativeError
impl Sync for NativeError
impl Unpin for NativeError
impl UnsafeUnpin for NativeError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.