Expand description
Draft-11 data stream header encoding and decoding.
Changes from draft-09/10:
- Datagram stream type IDs: 0x00 (no ext), 0x01 (with ext), 0x02 (status, no ext), 0x03 (status, with ext)
- Subgroup stream types: 0x08-0x0D (6 variants based on subgroup_id encoding and extensions)
- Fetch stream type: 0x05 (request_id only in header)
- Object within subgroup: object_id + [ext_headers_length + extensions] + payload_length
- [object_status if payload_length=0]
Re-exportsยง
use super::types::ObjectStatus;๐use crate::error::CodecError;๐use crate::object_properties::parse_object_properties;๐use crate::object_properties::ObjectProperty;๐use crate::object_properties::PropertyValue;๐use crate::types::read_bytes;๐use crate::varint::VarInt;๐use crate::version::DraftVersion;๐use bytes::Buf;๐use bytes::BufMut;๐
Structsยง
- Datagram
Header - Datagram header (draft-11, types 0x00/0x01).
- Datagram
Status Header - Datagram status header (draft-11, types 0x02/0x03).
- Fetch
Gaps - The Prior Group ID Gap conditions of draft-11 Section 10.1 that one fetch stream shows.
- Fetch
Header - Fetch stream header (draft-11, type 0x05).
- Fetch
Object Header - Object within a fetch stream (draft-11).
- Object
Header - Object within a subgroup stream (draft-11).
- Prior
Gaps - The Prior Group ID Gap values one Object carries.
- Subgroup
Gaps - The Prior Group ID Gap values the Objects of one subgroup stream carried.
- Subgroup
Header - Subgroup stream header (unified across all 6 stream type variants).
Enumsยง
- Datagram
- One datagram, of whichever shape its type field names.
- Stream
Type - Stream type IDs for draft-11 data streams.
Constantsยง
- PRIOR_
GROUP_ ID_ GAP - Prior Group ID Gap, Extension Header Type 0x40 (draft-11 Section 10.1).
Functionsยง
- check_
extensions_ ๐against_ status - Hold an object to the rule that a non-existent object carries no extensions.
- datagram_
type_ ๐error - Which failure a leading datagram type that is not one a reader wants is.
- read_
extension_ ๐bytes - stream_
type_ ๐error - Which failure a leading unidirectional stream type that is not the one a reader wants is.