#[non_exhaustive]pub enum Error {
Show 14 variants
MissingAnchor,
UnsupportedScheme {
scheme: String,
},
Scte35(Error),
Emsg(Error),
AttrParse(String),
MissingEventId,
EmsgTimescaleMismatch {
emsg: u32,
timing: u32,
},
EmsgPresentationTimeBeforeEpt,
EmsgDeltaOverflow(u64),
EmsgPresentationTimeOverflow,
UnsupportedPresentationTime,
HlsAttrValue(Error),
InvalidDuration {
what: &'static str,
value: f64,
},
TimestampOutOfRange(i64),
}Expand description
Errors produced by conversions and the crate::Timeline session.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MissingAnchor
A wall-clock conversion was attempted without a crate::TimeAnchor.
UnsupportedScheme
An emsg presented to crate::convert::emsg_to_scte35 is not a
SCTE-35 carriage scheme.
Scte35(Error)
SCTE-35 parse failure.
Emsg(Error)
emsg parse/serialize failure.
AttrParse(String)
EXT-X-DATERANGE tag could not be parsed.
MissingEventId
A SCTE-35-sourced event has no id (e.g. a time_signal cue with no
segmentation_descriptor), so it cannot be given a DATERANGE ID
(RFC 8216bis §4.4.5.1 requires unique IDs; emitting ID="" would
silently collide across cues).
EmsgTimescaleMismatch
emsg ↔ SegmentTiming timescale mismatch.
EmsgPresentationTimeBeforeEpt
v0 emsg cannot carry an event starting before the segment EPT.
EmsgDeltaOverflow(u64)
v0 presentation_time_delta overflowed u32.
EmsgPresentationTimeOverflow
A v0 emsg’s earliest_presentation_time + presentation_time_delta
overflowed u64 (ISO/IEC 23009-1 §5.10.3.3); a wrapped value would
silently place the event near time zero.
UnsupportedPresentationTime
The emsg carries a PresentationTime variant this crate does not
know how to convert (the enum is #[non_exhaustive] upstream).
HlsAttrValue(Error)
A DATERANGE attribute value (ID, CLASS, or a SCTE35-* hex
token) could not be represented as an RFC 8216 §4.2 quoted-string —
contains ", CR or LF (issue #1140 / audit r12-TM-W4): these values
are frequently sourced from an upstream SCTE-35 segmentation
descriptor’s segmentation_upid, which is caller/network data, not
this crate’s own.
InvalidDuration
DURATION/PLANNED-DURATION was NaN, infinite, or negative (issue
#1140 / audit r13-BH-W4-class). RFC 8216 decimal-floating-point is
non-negative and finite.
Fields
TimestampOutOfRange(i64)
A wall-clock instant is outside the range RFC 3339 formatting supports (years -9999..=9999).
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()