#[non_exhaustive]pub enum ConnectionFailureReason {
AdapterUnavailable,
OutOfRange,
Rejected,
Timeout,
AlreadyConnected,
PairingFailed,
BleError(String),
Other(String),
}Expand description
Structured reasons for connection failures.
This enum is marked #[non_exhaustive] to allow adding new reasons
in future versions without breaking downstream code.
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.
Bluetooth adapter not available or powered off.
OutOfRange
Device is out of range.
Rejected
Device rejected the connection.
Timeout
Connection attempt timed out.
AlreadyConnected
Already connected to another central.
PairingFailed
Pairing failed.
BleError(String)
Generic BLE error.
Other(String)
Other/unknown error.
Trait Implementations§
Source§impl Clone for ConnectionFailureReason
impl Clone for ConnectionFailureReason
Source§fn clone(&self) -> ConnectionFailureReason
fn clone(&self) -> ConnectionFailureReason
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConnectionFailureReason
impl Debug for ConnectionFailureReason
Source§impl Display for ConnectionFailureReason
impl Display for ConnectionFailureReason
Source§impl PartialEq for ConnectionFailureReason
impl PartialEq for ConnectionFailureReason
impl Eq for ConnectionFailureReason
impl StructuralPartialEq for ConnectionFailureReason
Auto Trait Implementations§
impl Freeze for ConnectionFailureReason
impl RefUnwindSafe for ConnectionFailureReason
impl Send for ConnectionFailureReason
impl Sync for ConnectionFailureReason
impl Unpin for ConnectionFailureReason
impl UnwindSafe for ConnectionFailureReason
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