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.

Re-exportsยง

use bytes::Buf; ๐Ÿ”’
use bytes::BufMut; ๐Ÿ”’
use super::types::ObjectStatus; ๐Ÿ”’
use crate::error::CodecError; ๐Ÿ”’
use crate::object_properties::ObjectProperty; ๐Ÿ”’
use crate::object_properties::PropertyValue; ๐Ÿ”’
use crate::varint::VarInt; ๐Ÿ”’

Structsยง

DatagramObject
Datagram carrying a single object.
DatagramType
Datagram type byte.
FetchGaps
The Prior Group ID Gap and Prior Object ID Gap conditions of draft-14 Section 11.1 and draft-14 Section 11.3 that one fetch stream shows.
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.
PriorGaps
The Prior Group ID Gap and Prior Object ID Gap one Object carries.
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.
PRIOR_GROUP_ID_GAP
Prior Group ID Gap, Extension Header Type 0x3C (Section 11.1).
PRIOR_OBJECT_ID_GAP
Prior Object ID Gap, Extension Header Type 0x3E (Section 11.3).

Functionsยง

check_extensions_against_status ๐Ÿ”’
Hold an object to the rule binding extension headers to Object Status.
collect_gaps ๐Ÿ”’
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.