Skip to main content

Module message

Module message 

Source
Expand description

Draft-13 control message encoding and decoding.

Key changes from draft-12:

  • subscribe_announcessubscribe_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
AnnounceCancel
AnnounceError
AnnounceOk
ClientSetup
Fetch
FetchCancel
FetchError
FetchOk
GoAway
MaxRequestId
Publish
PublishError
PublishOk
RequestsBlocked
ServerSetup
Subscribe
SubscribeDone
SubscribeError
SubscribeNamespace
SubscribeNamespaceError
SubscribeNamespaceOk
SubscribeOk
SubscribeUpdate
TrackStatus
TRACK_STATUS message (type 0x0D). Draft-13: subscribe-like request.
TrackStatusError
TRACK_STATUS_ERROR message (type 0x0F). New in draft-13.
TrackStatusOk
TRACK_STATUS_OK message (type 0x0E). Draft-13: subscribe_ok-like response.
Unannounce
Unsubscribe
UnsubscribeNamespace

Enums§

ControlMessage
FetchPayload
FetchType
MessageType

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§

StartLocation 🔒
Read the Start Location the filter says is there, as its two halves.