pub struct BleDeviceInfo {Show 13 fields
pub ble_support: bool,
pub id: String,
pub name: String,
pub bluetooth_on: bool,
pub adv_extended: bool,
pub adv_extended_bytes: u32,
pub le_2m: bool,
pub le_coded: bool,
pub le_audio: bool,
pub le_periodic_adv_support: bool,
pub le_multiple_adv_support: bool,
pub offload_filter_support: bool,
pub offload_scan_batching_support: bool,
}Expand description
BLE device information
Fields
ble_support: boolCheck if Bluetooth / Bluetooth Low Energy is supported
Android: check if a bluetooth adapter is found
id: StringBluetooth device address 48 bit unique Bluetooth device addr e.g. 80:86:F2:08:C7:98
Android: BluetoothAdapter getAddress() https://developer.android.com/reference/kotlin/android/bluetooth/BluetoothAdapter#getAddress()
name: StringGet Bluetooth Name this is field is purely informative
Android: BluetoothAdapter getName() https://developer.android.com/reference/kotlin/android/bluetooth/BluetoothAdapter#getName()
bluetooth_on: boolBluetooth is enable / powered on
Android: BluetoothAdapter isEnabled() https://developer.android.com/reference/kotlin/android/bluetooth/BluetoothAdapter#isEnabled()
adv_extended: boolIs extended advertisement supported?
Android: BluetoothAdapter isLeExtendedAdvertisingSupported () https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#isLeExtendedAdvertisingSupported()
adv_extended_bytes: u32what is the maximal amount of bytes sendable via advertising?
Android: BluetoothAdapter getLeMaximumAdvertisingDataLength() https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#getLeMaximumAdvertisingDataLength()
le_2m: boolIs 2M phy supported?
Android: BluetoothAdapter isLe2MPhySupported() https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#isLe2MPhySupported()
le_coded: boolis extended advertising supported in coded mode? (For long distance connections)
Android: BluetoothAdapter isLeCodedPhySupported() https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#isLeCodedPhySupported()
le_audio: boolis LE audio supported?
This is the most recent BLE feature, supported on:
- android 12 and above
- linux ?
- ios ?
- macos ?
- windows ?
Android: AndroidAdapter isLeAudioSupported() https://developer.android.com/reference/kotlin/android/bluetooth/BluetoothAdapter#isLeAudioSupported()
le_periodic_adv_support: boolis periodic advertisment supported?
Android: BluetoothAdapter isLePeriodicAdvertisingSupported() https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#isLePeriodicAdvertisingSupported()
le_multiple_adv_support: boolIs multi advertisement supported?
When multi advertisement is supported one can have different advertisement types parallely. Each advertisement has a different device address. For scanning devices it looks, as if multiple devices devices would advertise themselves. This is helpful to support several incompatible advertisement modes at the same time.
Android: BluetoothAdapter isMultipleAdvertisementSupported() https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#isMultipleAdvertisementSupported()
offload_filter_support: boolAndroid Specific: is Offloaded Filtering Supported?
Android: BluetoothAdapter isOffloadedFilteringSupported()
offload_scan_batching_support: boolAndroid Specific: is Offloaded Scan Batching Supported?
Android: BluetoothAdapter isOffloadedScanBatchingSupported() https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#isOffloadedScanBatchingSupported()
Trait Implementations
sourceimpl Clone for BleDeviceInfo
impl Clone for BleDeviceInfo
sourcefn clone(&self) -> BleDeviceInfo
fn clone(&self) -> BleDeviceInfo
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for BleDeviceInfo
impl Debug for BleDeviceInfo
sourceimpl Default for BleDeviceInfo
impl Default for BleDeviceInfo
sourceimpl Message for BleDeviceInfo
impl Message for BleDeviceInfo
sourcefn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
sourcefn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
Encodes the message to a buffer. Read more
sourcefn encode_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn encode_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Encodes the message to a newly allocated buffer.
sourcefn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
Encodes the message with a length-delimiter to a buffer. Read more
sourcefn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Encodes the message with a length-delimiter to a newly allocated buffer.
sourcefn decode<B>(buf: B) -> Result<Self, DecodeError> where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError> where
B: Buf,
Self: Default,
Decodes an instance of the message from a buffer. Read more
sourcefn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
B: Buf,
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
sourcefn merge<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
Decodes an instance of the message from a buffer, and merges it into self. Read more
sourcefn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
Decodes a length-delimited instance of the message from buffer, and
merges it into self. Read more
sourceimpl PartialEq<BleDeviceInfo> for BleDeviceInfo
impl PartialEq<BleDeviceInfo> for BleDeviceInfo
sourcefn eq(&self, other: &BleDeviceInfo) -> bool
fn eq(&self, other: &BleDeviceInfo) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &BleDeviceInfo) -> bool
fn ne(&self, other: &BleDeviceInfo) -> bool
This method tests for !=.
impl StructuralPartialEq for BleDeviceInfo
Auto Trait Implementations
impl RefUnwindSafe for BleDeviceInfo
impl Send for BleDeviceInfo
impl Sync for BleDeviceInfo
impl Unpin for BleDeviceInfo
impl UnwindSafe for BleDeviceInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more