pub struct NormData<'a> {
pub common: NormCommonHeader,
pub sender: SenderWord,
pub flags: u8,
pub fec_id: u8,
pub object_transport_id: u16,
pub fec_payload_id: &'a [u8],
pub extensions: Vec<HeaderExtension<'a>>,
pub payload: &'a [u8],
}Expand description
NORM_DATA fixed header beyond the common header + sender word (RFC 5740
§4.2.1, Figure 4): flags | fec_id | object_transport_id | fec_payload_id.
The fec_payload_id is opaque (size per fec_id). STREAM-only
payload_len/payload_msg_start/payload_offset fields and the payload
data are part of payload (they do not contribute to hdr_len); the caller
interprets them when NORM_FLAG_STREAM is set.
Fields§
§common: NormCommonHeaderCommon header.
sender: SenderWordShared sender word.
flags: u8Object flags (NORM_FLAG_*).
fec_id: u8FEC Encoding ID (implies fec_payload_id size/format).
object_transport_id: u16Monotonic NormTransportId of the object.
fec_payload_id: &'a [u8]FEC coding-block + symbol identifier (opaque, size per fec_id).
extensions: Vec<HeaderExtension<'a>>Header-extension chain.
payload: &'a [u8]Source/parity content (and, for STREAM, the leading payload_* fields).
Implementations§
Source§impl<'a> NormData<'a>
impl<'a> NormData<'a>
Sourcepub fn serialized_len(&self) -> usize
pub fn serialized_len(&self) -> usize
Total serialized length in bytes.
Sourcepub fn parse(data: &'a [u8], fec_payload_id_len: usize) -> Result<Self>
pub fn parse(data: &'a [u8], fec_payload_id_len: usize) -> Result<Self>
Parse a NORM_DATA. fec_payload_id_len is the FEC-scheme-defined size of
the FEC Payload ID in bytes.
Sourcepub fn serialize_into(&self, out: &mut [u8]) -> Result<usize>
pub fn serialize_into(&self, out: &mut [u8]) -> Result<usize>
Serialize into out, recomputing hdr_len. Returns bytes written.