Enum rubble::link::data::Pdu[][src]

pub enum Pdu<'a, L> {
    DataCont {
        message: L,
    },
    DataStart {
        message: L,
    },
    Control {
        data: BytesOr<'a, ControlPdu<'a>>,
    },
}
Expand description

Structured representation of a data channel PDU.

Variants

DataCont

Continuation of an L2CAP message (or empty PDU).

Fields of DataCont

message: L
DataStart

Start of an L2CAP message (must not be empty).

Fields of DataStart

message: L
Control

LL Control PDU for controlling the Link-Layer connection.

Fields of Control

data: BytesOr<'a, ControlPdu<'a>>

Implementations

Creates an empty PDU that carries no message.

This PDU can be sent whenever there’s no actual data to be transferred.

Returns the LLID field to use for this PDU.

Parses a PDU from a Header and raw payload.

Trait Implementations

Formats the value using the given formatter. Read more

Performs the conversion.

Serializes the payload of the PDU to bytes.

The PDU header must be constructed using Link-Layer state (and Pdu::llid).

Converts self to bytes and writes them into writer, advancing writer to point past the encoded value. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.