Skip to main content

check_ranges

Function check_ranges 

Source
fn check_ranges(message: &ControlMessage) -> Result<(), CodecError>
Expand description

Refuse a request whose range ends before it starts.

SUBSCRIBE’s AbsoluteRange filter (Section 8.7), SUBSCRIBE_UPDATE (Section 8.10) and FETCH (Section 8.16) each state it, and the fields are not spelled the same way in the three places: an End Group is inclusive on SUBSCRIBE and FETCH and is the last group plus one on SUBSCRIBE_UPDATE, where zero means open ended, and an End Object is the last object plus one with zero meaning the whole group. The helpers this calls carry those conventions, one per shape.

Applied on both sides. A range that ends before it starts selects nothing, and the peer’s only recourse is an error response or a session close, so writing one is not a way to ask for anything.