pub struct Identity {
pub addr: Address,
}Expand description
Identity of a peer device
Sometimes we have to save both the address and the IRK. Because sometimes the peer uses the static or public address even though the IRK is sent. In this case, the IRK exists but the used address is not RPA.
Fields§
§addr: AddressIdentity address (random static or public)
Implementations§
Source§impl Identity
impl Identity
Sourcepub fn match_address(&self, address: &Address) -> bool
pub fn match_address(&self, address: &Address) -> bool
Check whether the address matches the identity.
Matches if the address is an exact match (kind + addr) or if the IRK can resolve it.
Sourcepub fn match_identity(&self, identity: &Identity) -> bool
pub fn match_identity(&self, identity: &Identity) -> bool
Check whether the given identity matches current identity
Trait Implementations§
impl Copy for Identity
impl Eq for Identity
impl StructuralPartialEq for Identity
Auto Trait Implementations§
impl Freeze for Identity
impl RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl UnwindSafe for Identity
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