Skip to main content

Module message

Module message 

Source
Expand description

Control message types with encode/decode.

Re-exportsΒ§

use crate::auth_token::AuthorizationToken; πŸ”’
use crate::auth_token::AUTH_TOKEN_PARAMETER; πŸ”’
use crate::error::CodecError; πŸ”’
use crate::error::MAX_FULL_TRACK_NAME_LENGTH; πŸ”’
use crate::error::MAX_GOAWAY_URI_LENGTH; πŸ”’
use crate::error::MAX_MESSAGE_LENGTH; πŸ”’
use crate::error::MAX_REASON_PHRASE_LENGTH; πŸ”’
use crate::kvp::KeyValuePair; πŸ”’
use crate::kvp::KvpValue; πŸ”’
pub use crate::types::check_group_range;
pub use crate::types::check_location_range;
pub use crate::types::check_open_ended_group_range;
use crate::varint::VarInt; πŸ”’
use bytes::Buf; πŸ”’
use bytes::BufMut; πŸ”’
use crate::types::*; πŸ”’

StructsΒ§

ClientSetup
CLIENT_SETUP message (type 0x20).
Fetch
FETCH message (type 0x16).
FetchCancel
FETCH_CANCEL message (type 0x17).
FetchError
FETCH_ERROR message (type 0x19).
FetchOk
FETCH_OK message (type 0x18).
GoAway
GOAWAY message (type 0x10).
MaxRequestId
MAX_REQUEST_ID message (type 0x15).
Publish
PUBLISH message (type 0x1D).
PublishDone
PUBLISH_DONE message (type 0x0B).
PublishError
PUBLISH_ERROR message (type 0x1F).
PublishNamespace
PUBLISH_NAMESPACE message (type 0x06).
PublishNamespaceCancel
PUBLISH_NAMESPACE_CANCEL message (type 0x0C).
PublishNamespaceDone
PUBLISH_NAMESPACE_DONE message (type 0x09).
PublishNamespaceError
PUBLISH_NAMESPACE_ERROR message (type 0x08).
PublishNamespaceOk
PUBLISH_NAMESPACE_OK message (type 0x07).
PublishOk
PUBLISH_OK message (type 0x1E).
RequestsBlocked
REQUESTS_BLOCKED message (type 0x1A).
ServerSetup
SERVER_SETUP message (type 0x21).
Subscribe
SUBSCRIBE message (type 0x03).
SubscribeError
SUBSCRIBE_ERROR message (type 0x05).
SubscribeNamespace
SUBSCRIBE_NAMESPACE message (type 0x11).
SubscribeNamespaceError
SUBSCRIBE_NAMESPACE_ERROR message (type 0x13).
SubscribeNamespaceOk
SUBSCRIBE_NAMESPACE_OK message (type 0x12).
SubscribeOk
SUBSCRIBE_OK message (type 0x04).
SubscribeUpdate
SUBSCRIBE_UPDATE message (type 0x02).
TrackStatus
TRACK_STATUS message (type 0x0D) β€” subscribe-like request.
TrackStatusError
TRACK_STATUS_ERROR message (type 0x0F).
TrackStatusOk
TRACK_STATUS_OK message (type 0x0E) β€” subscribe_ok-like response.
Unsubscribe
UNSUBSCRIBE message (type 0x0A).
UnsubscribeNamespace
UNSUBSCRIBE_NAMESPACE message (type 0x14).

EnumsΒ§

ControlMessage
A parsed MoQT control message (draft-14).
FetchPayload
FETCH payload β€” either a standalone fetch or a joining fetch.
FetchType
FETCH type discriminator (standalone vs joining).
MessageType
Control message type IDs (draft-14).

ConstantsΒ§

KNOWN_SETUP_PARAMETERS πŸ”’
Every setup parameter type draft-14 names, from Section 9.3.2.
KNOWN_VERSION_SPECIFIC_PARAMETERS πŸ”’
Every version-specific parameter type draft-14 names, from Section 9.2.1.
REPEATABLE_PARAMETER πŸ”’
The one parameter type whose own definition lets it repeat.

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 πŸ”’
Hold a namespace-plus-name pair to the Full Track Name cap.
check_group_order πŸ”’
Refuse a Group Order of 0x0 on the messages that forbid it.
check_no_duplicate_parameters_received πŸ”’
Refuse a received parameter list that repeats a type this draft names.
check_no_duplicate_parameters_sent πŸ”’
Refuse a parameter list a sender may not put on the wire.
check_ranges πŸ”’
Refuse a request whose range ends before it starts.
decode_parameters πŸ”’
Decode a version-specific parameter list, refusing a repeated known type.
decode_setup_parameters πŸ”’
Decode a SETUP message’s parameter list, refusing a repeated known type.
encode_parameters πŸ”’
Encode a parameter list, refusing every repeat the sender’s rule forbids and every token that is not one.
read_group_order_response πŸ”’
Read a Group Order from a message that must name a real order.
read_reason_phrase πŸ”’
Read a Reason Phrase, holding it to the cap the draft states for the reader.