moqtap-client 0.3.0

MoQT client library — QUIC transport, endpoint state machine, subscribe/fetch/namespace flows
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![allow(missing_docs)]
use moqtap_codec::draft17::message::Setup;

/// Errors from setup message validation.
#[derive(Debug, thiserror::Error, PartialEq, Eq)]
pub enum SetupError {
    #[error("missing required parameter: {0}")]
    MissingParameter(&'static str),
    #[error("setup option rejected")]
    RejectedOption,
}

/// Validate a unified SETUP message. Draft-17 merges CLIENT_SETUP and
/// SERVER_SETUP into a single message and uses ALPN for version negotiation,
/// so there are no versions to validate.
pub fn validate_setup(_msg: &Setup) -> Result<(), SetupError> {
    Ok(())
}