pub struct BluetoothMetadata { /* private fields */ }Expand description
Initial Bluetooth annotations.
Implementations§
Source§impl BluetoothMetadata
impl BluetoothMetadata
Sourcepub fn from_whad_rx_descriptor(
channel: u8,
rssi: i16,
access_address: u32,
) -> Self
pub fn from_whad_rx_descriptor( channel: u8, rssi: i16, access_address: u32, ) -> Self
Create BLE metadata from scalar WHAD RX descriptor fields.
Sourcepub const fn signal_dbm(&self) -> Option<i16>
pub const fn signal_dbm(&self) -> Option<i16>
Received signal strength in dBm when known.
Sourcepub fn with_address(self, address: impl Into<String>) -> Self
pub fn with_address(self, address: impl Into<String>) -> Self
Set Bluetooth address.
Sourcepub const fn with_channel(self, channel: u16) -> Self
pub const fn with_channel(self, channel: u16) -> Self
Set channel.
Sourcepub const fn with_signal_dbm(self, signal_dbm: i16) -> Self
pub const fn with_signal_dbm(self, signal_dbm: i16) -> Self
Set received signal strength in dBm.
Sourcepub fn with_protocol(self, protocol: impl Into<String>) -> Self
pub fn with_protocol(self, protocol: impl Into<String>) -> Self
Set protocol label.
Trait Implementations§
Source§impl Clone for BluetoothMetadata
impl Clone for BluetoothMetadata
Source§fn clone(&self) -> BluetoothMetadata
fn clone(&self) -> BluetoothMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BluetoothMetadata
impl Debug for BluetoothMetadata
Source§impl Default for BluetoothMetadata
impl Default for BluetoothMetadata
Source§fn default() -> BluetoothMetadata
fn default() -> BluetoothMetadata
Returns the “default value” for a type. Read more
impl Eq for BluetoothMetadata
Source§impl Hash for BluetoothMetadata
impl Hash for BluetoothMetadata
Source§impl PartialEq for BluetoothMetadata
impl PartialEq for BluetoothMetadata
Source§fn eq(&self, other: &BluetoothMetadata) -> bool
fn eq(&self, other: &BluetoothMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BluetoothMetadata
Auto Trait Implementations§
impl Freeze for BluetoothMetadata
impl RefUnwindSafe for BluetoothMetadata
impl Send for BluetoothMetadata
impl Sync for BluetoothMetadata
impl Unpin for BluetoothMetadata
impl UnsafeUnpin for BluetoothMetadata
impl UnwindSafe for BluetoothMetadata
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