pub enum BleError {
Show 20 variants
AdapterNotAvailable,
NotPowered,
PermissionDenied(String),
NotSupported(String),
ConnectionFailed(String),
ConnectionLost(String),
DiscoveryFailed(String),
GattError(String),
CharacteristicNotFound(String),
ServiceNotFound(String),
MtuNegotiationFailed {
requested: u16,
actual: u16,
},
SecurityError(String),
PairingFailed(String),
SyncError(String),
PlatformError(String),
Timeout,
InvalidConfig(String),
InvalidState(String),
ResourceExhausted(String),
Io(String),
}Expand description
Errors that can occur during BLE operations
Variants§
AdapterNotAvailable
Bluetooth adapter not available on this device
NotPowered
Bluetooth is powered off
PermissionDenied(String)
Bluetooth permissions not granted
NotSupported(String)
Feature not supported by this adapter or platform
ConnectionFailed(String)
Connection to peer failed
ConnectionLost(String)
Connection was lost
DiscoveryFailed(String)
Discovery operation failed
GattError(String)
GATT operation failed
CharacteristicNotFound(String)
Characteristic not found
ServiceNotFound(String)
Service not found
MtuNegotiationFailed
MTU negotiation failed
SecurityError(String)
Security/pairing error
PairingFailed(String)
Pairing failed
SyncError(String)
Sync operation failed
PlatformError(String)
Platform-specific error
Timeout
Operation timed out
InvalidConfig(String)
Invalid configuration
InvalidState(String)
Invalid state for this operation
ResourceExhausted(String)
Resource exhausted (e.g., max connections reached)
Io(String)
I/O error
Trait Implementations§
Source§impl Error for BleError
impl Error for BleError
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()
Auto Trait Implementations§
impl Freeze for BleError
impl RefUnwindSafe for BleError
impl Send for BleError
impl Sync for BleError
impl Unpin for BleError
impl UnwindSafe 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