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_lengthorobject_status; payload is remaining bytes - DatagramStatus (0x02): gains
extension_headers_lengthfield
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Β§
- Datagram
Header - Datagram header with payload (draft-09, type 0x01).
- Datagram
Status Header - Datagram status header (draft-09, type 0x02).
- Fetch
Header - Fetch stream header (follows the stream type varint).
- Fetch
Object Header - Object within a fetch stream (draft-09).
- Object
Header - Object within a subgroup stream (draft-09).
- Subgroup
Header - Subgroup stream header (follows the stream type varint).
EnumsΒ§
- Datagram
- One datagram, of whichever shape its type field names.
- Stream
Type - 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_lenbytes 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.