Skip to main content

Module data_stream

Module data_stream 

Source
Expand description

Draft-14 data streams: subgroup streams, fetch streams, datagrams.

Draft-14 carries object data in three wire shapes:

  • Subgroup stream: starts with a Type byte 0x10..=0x1D whose bit-flags determine whether a Subgroup ID field is present, whether the subgroup ID is zero or the first Object ID, whether extension headers are present, and whether the stream ends at a group boundary. Object IDs are delta-encoded relative to the previous Object ID in the same stream.

  • Fetch stream: Type 0x05, Request ID, then a sequence of self-describing objects until FIN.

  • Datagram: Type byte 0x00..=0x07 or 0x20..=0x21 with bit-flags for End of Group, Extensions Present, Object ID Present, and Status vs Payload.

Structsยง

DatagramObject
Datagram carrying a single object.
DatagramType
Datagram type byte.
FetchHeader
Fetch stream header: the type byte 0x05 followed by the Request ID.
FetchObject
One object carried on a fetch stream.
FetchObjectMeta
The framing of one fetch object, without its payload.
SubgroupHeader
Subgroup stream header.
SubgroupObject
One object within a subgroup stream, with the Object ID already resolved from its delta encoding.
SubgroupObjectMeta
The framing of one subgroup object, without its payload.
SubgroupObjectReader
Stateful reader for the object fields on a subgroup stream.
SubgroupStreamType
Subgroup stream type byte.

Enumsยง

PayloadPermission
Whether an object carrying a given status may hold a non-empty payload.

Constantsยง

FETCH_STREAM_TYPE
Draft-14 fetch stream type byte.

Functionsยง

check_extensions_against_status ๐Ÿ”’
Hold an object to the rule binding extension headers to Object Status.
skip ๐Ÿ”’
Advance buf past len bytes without copying them.
stream_type_error ๐Ÿ”’
Which failure a leading unidirectional stream type that is not the one a reader wants is.