Expand description
The subscription filter drafts 15 through 19 carry inside a parameter.
Through draft-14 a subscription’s filter is a group of fields on SUBSCRIBE and its relatives: a Filter Type, and the Start Location and End Group that type promises. Draft-15 moved the whole group into one length-prefixed parameter, and draft-19 renamed that parameter from SUBSCRIPTION_FILTER to LOCATION_FILTER while leaving both its type number, 0x21, and its contents alone.
Draft-20 rebuilt that value — the Filter Type enum is gone and the shape
comes from the field count — so it reads its own filters through
draft20::message::decode_location_filter and does not use this module.
That name is spelled rather than linked because the module it names is
behind a feature flag, and a link would be broken in any build that leaves
draft-20 out. Draft-21 reads its own the same way.
Draft-22 brings a type back as the value’s first field, and it is not this
module’s: its Location Filter Type numbers the forms afresh (0x01 is a
relative start where draft-19’s 0x1 was Next Group Start, and 0x05 is the
Next Object), and the value has no length. Draft-22 reads it through
draft22::message::decode_location_filter, and draft-23 through its own,
and a filter of either read through this module would be misnamed rather
than refused.
The move is why this module exists. A parameter value is a run of bytes, and a codec that carries it as bytes carries the Filter Type with it — including the values the drafts require a receiver to close the session over, and including the Start Location a relay needs in order to know which Objects it was asked for.
Re-exports§
use bytes::Buf;🔒use bytes::BufMut;🔒use crate::error::CodecError;🔒use crate::kvp::KeyValuePair;🔒use crate::kvp::KvpValue;🔒use crate::types::FilterType;🔒use crate::types::Location;🔒use crate::varint::MoqtProfile;🔒use crate::varint::VarInt;🔒use crate::varint::VarIntError;🔒
Structs§
- Subscription
Filter - A decoded subscription filter.
Enums§
- Filter
End - The end of an AbsoluteRange filter, in whichever of the two forms the draft that carried it writes.
Constants§
- END_
IS_ 🔒ABSOLUTE - END_
IS_ 🔒DELTA - END_
MISSING 🔒 - END_
SURPLUS 🔒 - NO_END 🔒
- NO_
FILTER_ 🔒TYPE - NO_
START 🔒 - START_
MISSING 🔒 - START_
SURPLUS 🔒 - SUBSCRIPTION_
FILTER_ PARAMETER - The parameter type carrying a subscription filter on drafts 15 and later.
- TRAILING 🔒
Functions§
- malformed 🔒
- Report a parameter value that is not a filter.