dash_runtime/timing/
mod.rs1use thiserror::Error;
6
7pub mod availability;
8pub mod clock;
9pub mod datetime;
10pub mod live_edge;
11pub mod period;
12pub mod utc_timing;
13
14#[derive(Debug, Clone, Copy, PartialEq, Eq, Error)]
16#[non_exhaustive]
17pub enum TimingError {
18 #[error("response timestamp precedes the request timestamp")]
20 ExchangeReversed,
21 #[error("round trip of {rtt_us} us exceeds the {max_us} us limit")]
23 RttTooLarge {
24 rtt_us: u64,
26 max_us: u64,
28 },
29 #[error("UTC response body exceeds {max} bytes")]
31 BodyTooLarge {
32 max: usize,
34 },
35 #[error("UTC response body is not UTF-8")]
37 NotUtf8,
38 #[error("UTCTiming scheme {0} is not sampled from a response body")]
40 SchemeNotSampled(utc_timing::UtcScheme),
41 #[error(transparent)]
43 DateTime(#[from] datetime::DateTimeError),
44}