[][src]Struct bluetooth_mesh::crypto::materials::NetKeyMap

pub struct NetKeyMap {
    pub map: BTreeMap<NetKeyIndex, KeyPhase<NetworkSecurityMaterials>>,
}

Fields

map: BTreeMap<NetKeyIndex, KeyPhase<NetworkSecurityMaterials>>

Methods

impl NetKeyMap[src]

pub fn new() -> Self[src]

Important traits for NIDFilterMap<'a, I>
pub fn matching_nid(
    &self,
    nid_to_match: NID
) -> NIDFilterMap<Iter<NetKeyIndex, KeyPhase<NetworkSecurityMaterials>>>
[src]

Returns all NetworkSecurityMaterials matching nid_to_match. Because NID is a 7-bit value, one NID can match multiple different networks. For this reason, this functions returns an iterator that yields each matching network security materials. Only attempting to decrypt the Network PDU (and it failing/succeeding) will tell you if the NID and NetworkKeys match.

pub fn get_keys(
    &self,
    index: NetKeyIndex
) -> Option<&KeyPhase<NetworkSecurityMaterials>>
[src]

pub fn get_keys_mut(
    &mut self,
    index: NetKeyIndex
) -> Option<&mut KeyPhase<NetworkSecurityMaterials>>
[src]

pub fn remove_keys(
    &mut self,
    index: NetKeyIndex
) -> Option<KeyPhase<NetworkSecurityMaterials>>
[src]

pub fn insert(
    &mut self,
    index: NetKeyIndex,
    new_key: &NetKey
) -> Option<KeyPhase<NetworkSecurityMaterials>>
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,