#[non_exhaustive]pub struct CapCtx {
pub draft: Option<DraftVersion>,
pub stream_kind: Option<DataStreamType>,
pub is_control_stream: Option<bool>,
pub index_in_stream: Option<u64>,
pub subgroup_id_resolved: Option<bool>,
pub is_status_object: Option<bool>,
pub payload_len: Option<u64>,
pub replacement_len: Option<u64>,
pub payload_delimited: Option<bool>,
pub subgroup_id_mode: Option<u8>,
}Expand description
The facts classify needs.
A caller building the published table leaves the per-unit fields None
and gets Support::Conditional where the answer depends on them; the
engine fills them in and gets Support::Yes or Support::No.
The struct is #[non_exhaustive], so build one with
CapCtx::default and assign the fields that are known.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.draft: Option<DraftVersion>The draft the session is running as.
stream_kind: Option<DataStreamType>Which stream kind, at the object site.
is_control_stream: Option<bool>Whether the stream is a control stream.
Read at Site::StreamEnd, which publishes two columns: Some(true)
selects the control column, and Some(false) or None the data one.
index_in_stream: Option<u64>Zero-based index of the object within its stream.
subgroup_id_resolved: Option<bool>Whether the stream header determines the subgroup ID.
is_status_object: Option<bool>Whether the object carries an Object Status.
payload_len: Option<u64>Declared payload length.
replacement_len: Option<u64>Length of a proposed replacement payload.
payload_delimited: Option<bool>Whether this unit’s payload starts at a known offset.
Always Some(true) at the object site. At the datagram site the
engine sets it from data.len() - cursor.len() being a real
boundary — false on draft-14, on a status datagram, and when the
header did not decode. Drives
Precondition::DatagramPayloadDelimited.
subgroup_id_mode: Option<u8>The two-bit subgroup-ID mode, on the drafts 15-19 whose header type
carries one. None on drafts 07-14, which have no such pair of bits,
and when the caller did not supply it. Mode 1 is subgroup ID is the
first object’s ID; mode 3 is the value no draft assigns. Drives the
split between Refusal::WouldRedefineSubgroupId and
Refusal::ReservedHeaderMode.