dash_runtime/timing/
mod.rs1use thiserror::Error;
8
9pub mod availability;
10pub mod clock;
11pub use broadcast_common::http_date;
12pub mod live_edge;
13pub mod period;
14pub mod utc_timing;
15
16pub use broadcast_dash::xs_datetime as datetime;
17
18#[derive(Debug, Clone, Copy, PartialEq, Eq, Error)]
20#[non_exhaustive]
21pub enum TimingError {
22 #[error("response timestamp precedes the request timestamp")]
24 ExchangeReversed,
25 #[error("round trip of {rtt_us} us exceeds the {max_us} us limit")]
27 RttTooLarge {
28 rtt_us: u64,
30 max_us: u64,
32 },
33 #[error("UTC response body exceeds {max} bytes")]
35 BodyTooLarge {
36 max: usize,
38 },
39 #[error("UTC response body is not UTF-8")]
41 NotUtf8,
42 #[error("UTCTiming scheme {0} is not sampled from a response body")]
44 SchemeNotSampled(utc_timing::UtcScheme),
45 #[error(transparent)]
47 DateTime(#[from] datetime::DateTimeError),
48 #[error(transparent)]
50 HttpDate(#[from] http_date::HttpDateError),
51}