#[non_exhaustive]pub enum BleError {
Tlv8(Tlv8Error),
Crypto(CryptoError),
Model(ModelError),
AccessoryNotFound,
CharacteristicNotFound {
aid: u64,
iid: u64,
},
MalformedPdu(&'static str),
PairingRejected(u8),
Disconnected,
Backend(String),
}Expand description
Errors from the BLE transport.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Tlv8(Tlv8Error)
Malformed TLV8 in a PDU body or pairing message.
Crypto(CryptoError)
A pairing or AEAD crypto operation failed.
Model(ModelError)
The accessory attribute model could not be built or coerced.
AccessoryNotFound
No accessory matched the discovery filter.
CharacteristicNotFound
The requested characteristic is not in the accessory’s database.
MalformedPdu(&'static str)
A received HAP-BLE PDU was malformed.
PairingRejected(u8)
The accessory rejected a pairing step with a non-zero status.
Disconnected
The BLE link dropped mid-operation.
Backend(String)
An error from the BLE backend (transport-library specific).
Trait Implementations§
Source§impl Error for BleError
impl Error for BleError
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<CryptoError> for BleError
impl From<CryptoError> for BleError
Source§fn from(source: CryptoError) -> Self
fn from(source: CryptoError) -> Self
Converts to this type from the input type.
Source§impl From<ModelError> for BleError
impl From<ModelError> for BleError
Source§fn from(source: ModelError) -> Self
fn from(source: ModelError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for BleError
impl !UnwindSafe for BleError
impl Freeze for BleError
impl Send for BleError
impl Sync for BleError
impl Unpin for BleError
impl UnsafeUnpin for BleError
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