pub struct Address {
pub kind: AddrKind,
pub addr: BdAddr,
}Expand description
A BLE address. Every BLE device is identified by a unique Bluetooth Device Address, which is a 48-bit identifier similar to a MAC address. BLE addresses are categorized into two main types: Public and Random.
A Public Address is globally unique and assigned by the IEEE. It remains constant and is typically used by devices requiring a stable identifier.
A Random Address can be static or dynamic:
- Static Random Address: Remains fixed until the device restarts or resets.
- Private Random Address: Changes periodically for privacy purposes. It can be Resolvable (can be linked to the original device using an Identity Resolving Key) or Non-Resolvable (completely anonymous).
Random addresses enhance privacy by preventing device tracking.
Fields§
§kind: AddrKindAddress type.
addr: BdAddrAddress value.
Implementations§
Trait Implementations§
Source§impl PartialEq for Address
impl PartialEq for Address
Source§fn eq(&self, other: &Self) -> bool
fn eq(&self, other: &Self) -> bool
Compare two addresses, normalizing HCI identity address types.
In HCI events the controller may report a peer’s address type as 0x02 (Public Identity) or 0x03 (Random Static Identity) when it resolved the peer’s RPA via the resolving list. These are semantically equivalent to 0x00 (Public) and 0x01 (Random) respectively, so this implementation treats them as equal when comparing.