fn prefixes_overlap(a: &[Vec<u8>], b: &[Vec<u8>]) -> boolExpand description
Whether two namespace prefixes overlap.
Section 9.25: “A subscriber cannot make overlapping namespace subscriptions on a single session. Within a session, if a publisher receives a SUBSCRIBE_NAMESPACE with a Track Namespace Prefix that shares a common prefix with an established namespace subscription, it MUST respond with REQUEST_ERROR with error code PREFIX_OVERLAP.”
A namespace matches a namespace subscription when the subscription’s prefix is a prefix of it, so two prefixes select overlapping sets of namespaces exactly when one of them is a prefix of the other. Equal prefixes are that case as well: every prefix is a prefix of itself, and two equal ones select the same set.
“Shares a common prefix with” is read as the relation drafts 07 through 14 spell out at greater length. Taken at its word it would forbid every second namespace subscription in a session, since any two prefixes share the empty one, and nothing else in this draft supports that.