Skip to main content

Module subscription_filter

Module subscription_filter 

Source
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.

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.

Structs§

SubscriptionFilter
A decoded subscription filter.

Enums§

FilterEnd
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.