pub struct Address {
pub kind: AddressType,
pub bytes: [u8; 6],
}Expand description
A Bluetooth LE device address: type and the six bytes, least significant first (as on the air and in HCI).
Fields§
§kind: AddressTypePublic or random.
bytes: [u8; 6]The bytes, least significant first.
Implementations§
Source§impl Address
impl Address
Sourcepub fn random_kind(&self) -> Option<RandomKind>
pub fn random_kind(&self) -> Option<RandomKind>
For a random address, which kind.
Sourcepub fn is_resolvable(&self) -> bool
pub fn is_resolvable(&self) -> bool
A resolvable private address, which a stored IRK may resolve to an identity.
Sourcepub fn from_hci(kind: u8, bytes: [u8; 6]) -> Self
pub fn from_hci(kind: u8, bytes: [u8; 6]) -> Self
From an HCI address type octet. 2 and 3 (identity addresses the controller resolved) map to public and random.
Sourcepub fn new_static_random() -> Self
pub fn new_static_random() -> Self
A fresh static random address.
Trait Implementations§
impl Copy for Address
Source§impl<'de> Deserialize<'de> for Address
impl<'de> Deserialize<'de> for Address
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Address
Source§impl Ord for Address
impl Ord for Address
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Address
impl PartialOrd for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnsafeUnpin for Address
impl UnwindSafe for Address
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