pub struct PeripheralProperties {
pub address: BDAddr,
pub address_type: Option<AddressType>,
pub local_name: Option<String>,
pub tx_power_level: Option<i16>,
pub rssi: Option<i16>,
pub manufacturer_data: HashMap<u16, Vec<u8>>,
pub service_data: HashMap<Uuid, Vec<u8>>,
pub services: Vec<Uuid>,
pub class: Option<u32>,
}
Expand description
The properties of this peripheral, as determined by the advertising reports we’ve received for it.
Fields§
§address: BDAddr
The address of this peripheral
address_type: Option<AddressType>
The type of address (either random or public)
local_name: Option<String>
The local name. This is generally a human-readable string that identifies the type of device.
tx_power_level: Option<i16>
The transmission power level for the device
rssi: Option<i16>
The most recent Received Signal Strength Indicator for the device
manufacturer_data: HashMap<u16, Vec<u8>>
Advertisement data specific to the device manufacturer. The keys of this map are ‘manufacturer IDs’, while the values are arbitrary data.
service_data: HashMap<Uuid, Vec<u8>>
Advertisement data specific to a service. The keys of this map are ‘Service UUIDs’, while the values are arbitrary data.
services: Vec<Uuid>
Advertised services for this device
class: Option<u32>
Trait Implementations§
Source§impl Clone for PeripheralProperties
impl Clone for PeripheralProperties
Source§fn clone(&self) -> PeripheralProperties
fn clone(&self) -> PeripheralProperties
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 PeripheralProperties
impl Debug for PeripheralProperties
Source§impl Default for PeripheralProperties
impl Default for PeripheralProperties
Source§fn default() -> PeripheralProperties
fn default() -> PeripheralProperties
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PeripheralProperties
impl<'de> Deserialize<'de> for PeripheralProperties
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PeripheralProperties, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PeripheralProperties, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for PeripheralProperties
impl Serialize for PeripheralProperties
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for PeripheralProperties
impl RefUnwindSafe for PeripheralProperties
impl Send for PeripheralProperties
impl Sync for PeripheralProperties
impl Unpin for PeripheralProperties
impl UnwindSafe for PeripheralProperties
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