Skip to main content

Module fill

Module fill 

Source
Expand description

Location filters and fill fetch streams, the two things draft-23 asks a subscriber to build byte by byte.

The range of a FETCH travels in the LOCATION_FILTER message parameter (Section 9.19.9), and FILL_PARAMETERS (Section 9.19.15) is a parameter whose presence on a SUBSCRIBE or a REQUEST_UPDATE asks the publisher to open a fill fetch stream, and whose value is a nested parameter block that overrides the subscription’s own settings for that fill alone.

Both are parameter values a caller would otherwise have to construct by hand, which is why they are here: neither carries anything a receiver could resynchronise on, so getting either wrong desynchronises the whole parameter list rather than producing a recognisable error. A LOCATION_FILTER has no length at all — its Location Filter Type is the only thing that says where it ends — and FILL_PARAMETERS is the place draft-23 is least explicit.

§What this module decides, and where the draft is silent

  • A FILL_PARAMETERS value’s Type Delta chain restarts at 0. See FillParameters.
  • A fill fetch stream with no GROUP_ORDER anywhere is read Ascending. See group_order.

Every value this module builds is handed to the codec’s own decoder before it is returned, so a disagreement between the two is an error here rather than a frame on the wire.

§Ranges are inclusive

Draft-23 Section 3.3.1 says a Location filter “specifies an inclusive range of Locations”, and Section 3.2 that a FETCH requests Objects “between a Start Location and an End Location, inclusive”. Nothing in this module adds or subtracts one from an end location.

Re-exports§

use moqtap_codec::draft23::data_stream::GroupOrder; 🔒
use moqtap_codec::draft23::message::decode_fill_parameters; 🔒
use moqtap_codec::draft23::message::decode_location_filter; 🔒
use moqtap_codec::draft23::message::location_filter_types; 🔒
use moqtap_codec::draft23::message::FILL_PARAMETERS; 🔒
use moqtap_codec::draft23::message::LOCATION_FILTER; 🔒
use moqtap_codec::kvp::KeyValuePair; 🔒
use moqtap_codec::kvp::KvpValue; 🔒
use moqtap_codec::varint::Moqt18 as Wire; 🔒
use moqtap_codec::varint::VarInt; 🔒

Structs§

FillParameters
A draft-23 FILL_PARAMETERS (Parameter Type 0x23), Section 9.19.15.
LocationFilter
A draft-23 LOCATION_FILTER (Parameter Type 0x21), Section 9.19.9.

Enums§

FillError
Errors from building a LOCATION_FILTER or a FILL_PARAMETERS value.

Constants§

FILL_PARAMETERS_ALLOWED 🔒
The parameter types draft-23 Section 9.19.15, Table 7 permits inside a FILL_PARAMETERS value, in ascending order.
GROUP_ORDER
GROUP_ORDER, Parameter Type 0x22 (Section 9.19.8).
GROUP_ORDER_ASCENDING 🔒
The GROUP_ORDER value Section 9.19.8 assigns to Ascending.
GROUP_ORDER_DESCENDING 🔒
The GROUP_ORDER value Section 9.19.8 assigns to Descending.

Functions§

check_end_group 🔒
encode_group_order 🔒
The Section 9.19.8 value for a Group Order.
encode_nested_value 🔒
Write one nested parameter’s value in the shape its type names.
group_order
The Group Order a fill fetch stream’s Objects arrive in, given the parameters of the SUBSCRIBE (or REQUEST_UPDATE) that asked for the fill.
insert_parameter
Put parameter into parameters at the position ascending type order requires.
is_bare_varint 🔒
Whether a Table 7 parameter’s value is a bare varint.
is_length_prefixed 🔒
Whether a Table 7 parameter’s value carries its own length prefix.
is_uint8 🔒
Whether a Table 7 parameter’s value is a single raw byte rather than a varint or a length-prefixed block.
may_repeat 🔒
The five Range Filters, of which four may be nested. Only these may repeat.
read_group_order 🔒
The GROUP_ORDER in one parameter list, or None if it holds none.