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_PARAMETERSvalue’sType Deltachain restarts at 0. SeeFillParameters. - A fill fetch stream with no
GROUP_ORDERanywhere is read Ascending. Seegroup_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§
- Fill
Parameters - A draft-23
FILL_PARAMETERS(Parameter Type 0x23), Section 9.19.15. - Location
Filter - A draft-23
LOCATION_FILTER(Parameter Type 0x21), Section 9.19.9.
Enums§
- Fill
Error - Errors from building a
LOCATION_FILTERor aFILL_PARAMETERSvalue.
Constants§
- FILL_
PARAMETERS_ 🔒ALLOWED - The parameter types draft-23 Section 9.19.15, Table 7 permits inside a
FILL_PARAMETERSvalue, in ascending order. - GROUP_
ORDER GROUP_ORDER, Parameter Type 0x22 (Section 9.19.8).- GROUP_
ORDER_ 🔒ASCENDING - The
GROUP_ORDERvalue Section 9.19.8 assigns to Ascending. - GROUP_
ORDER_ 🔒DESCENDING - The
GROUP_ORDERvalue 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
parameterintoparametersat 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_ORDERin one parameter list, orNoneif it holds none.