pub enum PoKeysError {
Show 49 variants
Generic,
DeviceNotFound,
NotConnected,
ConnectionFailed,
CommunicationError,
Transfer(String),
InvalidParameter,
Parameter(String),
NotSupported,
UnsupportedOperation,
CannotClaimUsb,
CannotConnect,
Io(Error),
InvalidChecksum,
InvalidResponse,
Timeout,
EnumerationFailed,
InvalidHandle,
Protocol(String),
InternalError(String),
ModelLoadError(String, String),
ModelParseError(String, String),
ModelValidationError(String),
ModelDirCreateError(String, String),
ModelDirReadError(String, String),
ModelWatcherError(String),
UnsupportedPinCapability(u8, String),
MissingRelatedCapability(u8, String, String),
RelatedPinInactive(u8, String),
RelatedCapabilityError(String),
PinConflict(String),
InvalidPin(u8),
InvalidConfiguration(String),
I2cPacketTooLarge {
size: usize,
max_size: usize,
suggestion: String,
},
I2cTimeout,
I2cBusError,
I2cNack,
NetworkTimeout,
MaxRetriesExceeded,
InvalidPacketStructure(String),
InvalidCommand(u8),
InvalidDeviceId(u8),
InvalidChecksumDetailed {
expected: u8,
received: u8,
},
InvalidSegmentMapping(String),
SegmentMappingNotSupported,
CustomPinoutError(String),
USPIBridgeCommandFailed(String),
VirtualDeviceError(String),
InvalidVirtualDeviceId {
id: u8,
max: u8,
},
}Expand description
Main error type for PoKeys operations
Variants§
Generic
DeviceNotFound
NotConnected
ConnectionFailed
CommunicationError
Transfer(String)
InvalidParameter
Parameter(String)
NotSupported
UnsupportedOperation
CannotClaimUsb
CannotConnect
Io(Error)
InvalidChecksum
InvalidResponse
Timeout
EnumerationFailed
InvalidHandle
Protocol(String)
InternalError(String)
ModelLoadError(String, String)
ModelParseError(String, String)
ModelValidationError(String)
ModelDirCreateError(String, String)
ModelDirReadError(String, String)
ModelWatcherError(String)
UnsupportedPinCapability(u8, String)
MissingRelatedCapability(u8, String, String)
RelatedPinInactive(u8, String)
RelatedCapabilityError(String)
PinConflict(String)
InvalidPin(u8)
InvalidConfiguration(String)
I2cPacketTooLarge
I2cTimeout
I2cBusError
I2cNack
NetworkTimeout
MaxRetriesExceeded
InvalidPacketStructure(String)
InvalidCommand(u8)
InvalidDeviceId(u8)
InvalidChecksumDetailed
InvalidSegmentMapping(String)
SegmentMappingNotSupported
CustomPinoutError(String)
USPIBridgeCommandFailed(String)
VirtualDeviceError(String)
InvalidVirtualDeviceId
Implementations§
Source§impl PoKeysError
impl PoKeysError
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if an error is recoverable through retry mechanisms
Sourcepub fn recovery_strategy(&self) -> RecoveryStrategy
pub fn recovery_strategy(&self) -> RecoveryStrategy
Get the recommended recovery strategy for this error
Trait Implementations§
Source§impl Debug for PoKeysError
impl Debug for PoKeysError
Source§impl Display for PoKeysError
impl Display for PoKeysError
Source§impl Error for PoKeysError
impl Error for PoKeysError
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<Error> for PoKeysError
impl From<Error> for PoKeysError
Source§impl From<PoKeysError> for ReturnCode
impl From<PoKeysError> for ReturnCode
Source§fn from(error: PoKeysError) -> Self
fn from(error: PoKeysError) -> Self
Converts to this type from the input type.
Source§impl From<ReturnCode> for PoKeysError
impl From<ReturnCode> for PoKeysError
Source§fn from(code: ReturnCode) -> Self
fn from(code: ReturnCode) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PoKeysError
impl PartialEq for PoKeysError
Auto Trait Implementations§
impl Freeze for PoKeysError
impl !RefUnwindSafe for PoKeysError
impl Send for PoKeysError
impl Sync for PoKeysError
impl Unpin for PoKeysError
impl !UnwindSafe for PoKeysError
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