Expand description
Draft-13 control message encoding and decoding.
Key changes from draft-12:
subscribe_announces→subscribe_namespace(same IDs 0x11–0x14)- TrackStatusRequest (0x0D) → TrackStatus: subscribe-like request with subscriber_priority, group_order, forward, filter_type
- TrackStatus (0x0E) → TrackStatusOk: subscribe_ok-like response with track_alias, expires, group_order, content_exists, largest_location
- New TrackStatusError (0x0F): request_id + error_code + reason_phrase
- Publish/PublishOk/PublishError (0x1D-0x1F) added
Re-exports§
pub use crate::types::check_group_range;pub use crate::types::check_location_range;pub use crate::types::check_open_ended_group_range;
Structs§
- Announce
- Announce
Cancel - Announce
Error - Announce
Ok - Client
Setup - Fetch
- Fetch
Cancel - Fetch
Error - FetchOk
- GoAway
- MaxRequest
Id - Publish
- Publish
Error - Publish
Ok - Requests
Blocked - Server
Setup - Subscribe
- Subscribe
Done - Subscribe
Error - Subscribe
Namespace - Subscribe
Namespace Error - Subscribe
Namespace Ok - Subscribe
Ok - Subscribe
Update - Track
Status - TRACK_STATUS message (type 0x0D). Draft-13: subscribe-like request.
- Track
Status Error - TRACK_STATUS_ERROR message (type 0x0F). New in draft-13.
- Track
Status Ok - TRACK_STATUS_OK message (type 0x0E). Draft-13: subscribe_ok-like response.
- Unannounce
- Unsubscribe
- Unsubscribe
Namespace
Enums§
Constants§
- AUTHORIZATION_
TOKEN 🔒 - AUTHORIZATION TOKEN, the Version Specific Parameter of Section 8.2.1.1.
- DELIVERY_
TIMEOUT 🔒 - DELIVERY TIMEOUT, the Version Specific Parameter of Section 8.2.1.2.
- KNOWN_
PARAMETERS 🔒 - Every Version Specific Parameter Type Section 8.2.1 names.
- KNOWN_
SETUP_ 🔒PARAMETERS - Every Setup Parameter Type Section 8.3.2 names.
- MAX_
CACHE_ 🔒DURATION - MAX_CACHE_DURATION, the Version Specific Parameter of Section 8.2.1.3.
- REPEATABLE_
PARAMETERS 🔒 - The Version Specific Parameter Types whose own definition allows a repeat.
- REPEATABLE_
SETUP_ 🔒PARAMETERS - The Setup Parameter Types whose own definition allows a repeat.
- SETUP_
AUTHORIZATION_ 🔒TOKEN - AUTHORIZATION TOKEN, the Setup Parameter of Section 8.3.2.4.
- SETUP_
MAX_ 🔒AUTH_ TOKEN_ CACHE_ SIZE - MAX_AUTH_TOKEN_CACHE_SIZE, the Setup Parameter of Section 8.3.2.3.
- SETUP_
MAX_ 🔒REQUEST_ ID - MAX_REQUEST_ID, the Setup Parameter of Section 8.3.2.2.
- SETUP_
PATH 🔒 - PATH, the Setup Parameter of Section 8.3.2.1.
Functions§
- check_
authorization_ 🔒tokens - Hold every AUTHORIZATION TOKEN parameter to the Token structure it names.
- check_
discriminators 🔒 - Refuse a message whose discriminator disagrees with the fields beside it.
- check_
full_ 🔒track_ name - check_
group_ 🔒order - Refuse a Group Order of 0x0 on the messages that forbid it.
- check_
ranges 🔒 - Refuse a request whose range ends before it starts.
- check_
receiver_ 🔒parameters - Refuse a received parameter list only where Section 8.2 lets a receiver refuse it.
- check_
sender_ 🔒parameters - Refuse a parameter list a sender is not allowed to put on the wire.
- decode_
parameters 🔒 - Decode a Version Specific Parameter list.
- decode_
setup_ 🔒parameters - Decode the Setup Parameters of a CLIENT_SETUP or SERVER_SETUP message.
- encode_
parameters 🔒 - Encode a Version Specific Parameter list.
- encode_
setup_ 🔒parameters - Encode the Setup Parameters of a CLIENT_SETUP or SERVER_SETUP message.
- read_
content_ 🔒exists - Read a Content Exists flag, which carries the same sentence as Forward and also decides whether a Largest Location follows.
- read_
end_ 🔒group - Read the End Group the filter says is there.
- read_
filter_ 🔒type - Read a Filter Type.
- read_
forward 🔒 - Read a Forward flag: “Any other value is a protocol error and MUST terminate the session with a Protocol Violation”
- read_
group_ 🔒order - Read a Group Order from a message that lets the publisher choose.
- read_
group_ 🔒order_ response - Read a Group Order from a message that must name a real order.
- read_
largest_ 🔒location - Read the Largest Location that Content Exists says is there.
- read_
reason_ 🔒phrase - Read a Reason Phrase, holding it to the cap this draft states for a receiver.
- read_
start_ 🔒location - read_u8 🔒
- Take one byte, or report the end of the buffer instead of panicking.
Type Aliases§
- Start
Location 🔒 - Read the Start Location the filter says is there, as its two halves.