pub enum BridgeError {
WrongAnswer {
asked: u8,
answered: u8,
},
Short {
got: usize,
needs: usize,
},
Refused {
status: u8,
},
Transfer {
id: u8,
status: u8,
},
UnknownEntry {
id: u8,
kind: u8,
},
TooMany,
}Expand description
What the bridge refused, or answered wrongly.
Variants§
WrongAnswer
The bridge answered a different order than the one sent.
Short
The answer is shorter than that order’s answer is.
Refused
A pin write or a reset did not take.
Transfer
One SPI entry in a bulk order failed.
Fields
UnknownEntry
An SPI entry in the answer is not one of the two kinds.
TooMany
A bulk order holds more than the bridge takes.
Trait Implementations§
Source§impl Clone for BridgeError
impl Clone for BridgeError
Source§fn clone(&self) -> BridgeError
fn clone(&self) -> BridgeError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BridgeError
Source§impl Debug for BridgeError
impl Debug for BridgeError
Source§impl Display for BridgeError
impl Display for BridgeError
impl Eq for BridgeError
Source§impl Error for BridgeError
impl Error for BridgeError
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 PartialEq for BridgeError
impl PartialEq for BridgeError
impl StructuralPartialEq for BridgeError
Auto Trait Implementations§
impl Freeze for BridgeError
impl RefUnwindSafe for BridgeError
impl Send for BridgeError
impl Sync for BridgeError
impl Unpin for BridgeError
impl UnsafeUnpin for BridgeError
impl UnwindSafe for BridgeError
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