Skip to main content

Module data_stream

Module data_stream 

Source
Expand description

Draft-09 data stream header encoding and decoding.

Changes from draft-08:

  • extension_count β†’ extension_headers_length (byte length, not count)
  • Datagram (0x01): no payload_length or object_status; payload is remaining bytes
  • DatagramStatus (0x02): gains extension_headers_length field

Re-exportsΒ§

use super::types::ObjectStatus; πŸ”’
use crate::error::CodecError; πŸ”’
use crate::types::read_bytes; πŸ”’
use crate::varint::VarInt; πŸ”’
use bytes::Buf; πŸ”’
use bytes::BufMut; πŸ”’

StructsΒ§

DatagramHeader
Datagram header with payload (draft-09, type 0x01).
DatagramStatusHeader
Datagram status header (draft-09, type 0x02).
FetchHeader
Fetch stream header (follows the stream type varint).
FetchObjectHeader
Object within a fetch stream (draft-09).
ObjectHeader
Object within a subgroup stream (draft-09).
SubgroupHeader
Subgroup stream header (follows the stream type varint).

EnumsΒ§

Datagram
One datagram, of whichever shape its type field names.
StreamType
Every type ID this draft’s data plane assigns, from two separate tables.

FunctionsΒ§

check_end_of_track πŸ”’
Refuse an end-of-track object that does not end at object zero.
datagram_type_error πŸ”’
Which failure a leading datagram type that is not one a reader wants is.
encode_extensions πŸ”’
Encode extension bytes to the buffer (just writes the raw bytes).
read_extension_bytes πŸ”’
Read byte_len bytes of raw extension data from the buffer.
stream_type_error πŸ”’
Which failure a leading unidirectional stream type that is not the one a reader wants is.