#[repr(transparent)]pub struct IdentityResolvingKey(pub NonZeroU128);Expand description
Identity Resolving Key.
Tuple Fields§
§0: NonZeroU128Implementations§
Source§impl IdentityResolvingKey
impl IdentityResolvingKey
Sourcepub const fn from_le_bytes(k: [u8; 16]) -> Option<Self>
pub const fn from_le_bytes(k: [u8; 16]) -> Option<Self>
Creates an Identity Resolving Key from a [u8; 16] value in little endian.
Sourcepub const fn to_le_bytes(self) -> [u8; 16]
pub const fn to_le_bytes(self) -> [u8; 16]
Returns the Identity Resolving Key as [u8; 16] value in little endian.
Sourcepub fn generate_resolvable_address<T: RngCore + CryptoRng>(
&self,
rng: &mut T,
) -> [u8; 6]
pub fn generate_resolvable_address<T: RngCore + CryptoRng>( &self, rng: &mut T, ) -> [u8; 6]
Generates a resolvable private address using this key.
The generated address follows the format described in Bluetooth Core Specification [Vol 3] Part C, Section 10.8.2.
Sourcepub fn resolve_address(&self, address: &BdAddr) -> bool
pub fn resolve_address(&self, address: &BdAddr) -> bool
Resolves a resolvable private address.
Returns true if the address was generated using this IRK.
Trait Implementations§
Source§impl Clone for IdentityResolvingKey
impl Clone for IdentityResolvingKey
Source§fn clone(&self) -> IdentityResolvingKey
fn clone(&self) -> IdentityResolvingKey
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 IdentityResolvingKey
impl Debug for IdentityResolvingKey
Source§impl Display for IdentityResolvingKey
impl Display for IdentityResolvingKey
Source§impl Format for IdentityResolvingKey
Available on crate feature defmt only.
impl Format for IdentityResolvingKey
Available on crate feature
defmt only.Source§impl From<&IdentityResolvingKey> for u128
impl From<&IdentityResolvingKey> for u128
Source§fn from(k: &IdentityResolvingKey) -> Self
fn from(k: &IdentityResolvingKey) -> Self
Converts to this type from the input type.
Source§impl PartialEq for IdentityResolvingKey
impl PartialEq for IdentityResolvingKey
impl Copy for IdentityResolvingKey
impl Eq for IdentityResolvingKey
impl StructuralPartialEq for IdentityResolvingKey
Auto Trait Implementations§
impl Freeze for IdentityResolvingKey
impl RefUnwindSafe for IdentityResolvingKey
impl Send for IdentityResolvingKey
impl Sync for IdentityResolvingKey
impl Unpin for IdentityResolvingKey
impl UnwindSafe for IdentityResolvingKey
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