[][src]Enum bluetooth_mesh::upper::PDU

pub enum PDU<Storage: AsRef<[u8]>> {
    Control(ControlPayload<Storage>),
    Access(EncryptedAppPayload<Storage>),
}

Variants

Control(ControlPayload<Storage>)
Access(EncryptedAppPayload<Storage>)

Methods

impl<Storage: AsRef<[u8]>> PDU<Storage>[src]

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

pub fn should_segment(&self) -> bool[src]

pub fn seg_o(&self) -> SegO[src]

pub fn seg_n_data(&self, seg_n: SegN) -> &[u8][src]

Gets Segment N's data to be sent. !! THE MIC WON'T BE INCLUDED !!. Access Messages include a MIC and will have to be append to the end of the payload manually.

Panics

Panics if seg_n > seg_o

pub fn is_control(&self) -> bool[src]

pub fn payload(&self) -> &[u8][src]

pub fn is_access(&self) -> bool[src]

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

pub fn mic(&self) -> Option<MIC>[src]

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

Trait Implementations

impl<Storage: Clone + AsRef<[u8]>> Clone for PDU<Storage>[src]

Auto Trait Implementations

impl<Storage> RefUnwindSafe for PDU<Storage> where
    Storage: RefUnwindSafe

impl<Storage> Send for PDU<Storage> where
    Storage: Send

impl<Storage> Sync for PDU<Storage> where
    Storage: Sync

impl<Storage> Unpin for PDU<Storage> where
    Storage: Unpin

impl<Storage> UnwindSafe for PDU<Storage> where
    Storage: UnwindSafe

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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