pub enum UsbError {
Io(Error),
Bridge(BridgeError),
TooLong {
size: usize,
room: usize,
},
FrameTooLong {
len: usize,
},
Rejected,
Poisoned,
}Expand description
What went wrong talking to the bridge.
Variants§
Io(Error)
The port failed.
Bridge(BridgeError)
The bridge answered something it should not have.
TooLong
The bridge answered with more than there was room for.
FrameTooLong
A frame the driver built is longer than one message carries.
Rejected
The bridge could not read the order at all.
Poisoned
Another holder of the bridge panicked while holding it.
Trait Implementations§
Source§impl Error for UsbError
impl Error for UsbError
1.30.0 · 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 From<BridgeError> for UsbError
impl From<BridgeError> for UsbError
Source§fn from(error: BridgeError) -> UsbError
fn from(error: BridgeError) -> UsbError
Converts to this type from the input type.
Source§impl<T> From<PoisonError<T>> for UsbError
impl<T> From<PoisonError<T>> for UsbError
Source§fn from(_: PoisonError<T>) -> UsbError
fn from(_: PoisonError<T>) -> UsbError
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for UsbError
impl !UnwindSafe for UsbError
impl Freeze for UsbError
impl Send for UsbError
impl Sync for UsbError
impl Unpin for UsbError
impl UnsafeUnpin for UsbError
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