pub enum BleLinkState {
None = 0,
Connected = 1,
Attached = 2,
}Expand description
PROP_BLE_LINK states.
Variants§
None = 0
BLE_LINK_NONE — nothing is connected over Bluetooth.
Connected = 1
BLE_LINK_CONNECTED — a central holds a connection but has not
opened a ULCP session on it.
Attached = 2
BLE_LINK_ATTACHED — a host is attached and running ULCP over
Bluetooth.
Implementations§
Source§impl BleLinkState
impl BleLinkState
Sourcepub const fn is_connected(self) -> bool
pub const fn is_connected(self) -> bool
Whether anything at all holds a Bluetooth connection to the device, attached or not.
Sourcepub const fn is_attached(self) -> bool
pub const fn is_attached(self) -> bool
Whether a host is attached over Bluetooth, which is the question “is someone managing this device right now” actually asks.
Trait Implementations§
Source§impl Clone for BleLinkState
impl Clone for BleLinkState
Source§fn clone(&self) -> BleLinkState
fn clone(&self) -> BleLinkState
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BleLinkState
impl Debug for BleLinkState
Source§impl Default for BleLinkState
impl Default for BleLinkState
Source§fn default() -> BleLinkState
fn default() -> BleLinkState
Returns the “default value” for a type. Read more
Source§impl PartialEq for BleLinkState
impl PartialEq for BleLinkState
impl Copy for BleLinkState
impl Eq for BleLinkState
impl StructuralPartialEq for BleLinkState
Auto Trait Implementations§
impl Freeze for BleLinkState
impl RefUnwindSafe for BleLinkState
impl Send for BleLinkState
impl Sync for BleLinkState
impl Unpin for BleLinkState
impl UnwindSafe for BleLinkState
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)