[][src]Struct bluetooth_mesh::net::EncryptedData

pub struct EncryptedData<'a> { /* fields omitted */ }

Holds the encrypted destination address, transport PDU and MIC.

Methods

impl<'_> EncryptedData<'_>[src]

pub fn new(encrypted_data: &[u8], mic: MIC) -> EncryptedData[src]

Panics

Panics if encrypted_data.len() <= ENCRYPTED_DATA_MIN_LEN or encrypted_data.len() > ENCRYPTED_DATA_MAX_LEN

#[must_use] pub const fn len(&self) -> usize[src]

#[must_use] pub const fn is_empty(&self) -> bool[src]

#[must_use] pub fn data(&self) -> &[u8][src]

encrypted DST and TransportPDU excluding MIC

#[must_use] pub fn data_len(&self) -> usize[src]

pub fn mic_size(&self) -> usize[src]

#[must_use] pub fn mic(&self) -> MIC[src]

#[must_use] pub fn packed_privacy_random(
    &self,
    dst: Address,
    iv_index: IVIndex
) -> PackedPrivacy
[src]

#[must_use] pub const fn max_len() -> usize[src]

pub fn try_decrypt(
    &self,
    network_keys: &NetworkKeys,
    nonce: &NetworkNonce
) -> Option<DecryptedData>
[src]

pub fn pack_into(&self, buffer: &mut [u8])[src]

Panics

Panics if buffer.len() < self.len().

Trait Implementations

impl<'_> AsRef<[u8]> for EncryptedData<'_>[src]

impl<'a> From<&'a OwnedEncryptedData> for EncryptedData<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for EncryptedData<'a>

impl<'a> Send for EncryptedData<'a>

impl<'a> Sync for EncryptedData<'a>

impl<'a> Unpin for EncryptedData<'a>

impl<'a> UnwindSafe for EncryptedData<'a>

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>,