#[non_exhaustive]pub enum Error {
NoAlignedBoundary {
requested_pts: u64,
tolerance_ticks: u64,
nearest_delta_ticks: u64,
},
NoCandidates,
PtsOutOfRange {
pts: u64,
modulus: u64,
},
MissingProgramDateTime,
InvalidAssetSource,
NoActiveBreak(String),
BreakAlreadyActive(String),
TagParse(String),
HlsAttrValue(Error),
InvalidDuration {
what: &'static str,
value: f64,
},
}Expand description
Errors produced by session, decision, splice-conditioning, and playlist rendering operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoAlignedBoundary
crate::splice::condition_splice_point found no candidate boundary
within the caller’s tolerance.
Fields
NoCandidates
crate::splice::condition_splice_point was called with an empty
candidate slice.
PtsOutOfRange
A PTS value (or the modulus itself) passed to
crate::splice::condition_splice_point_wrapping was not below a
non-zero modulus (issue #1125 / audit r14-SSAI-W2).
MissingProgramDateTime
The base playlist carries no #EXT-X-PROGRAM-DATE-TIME tag, which
RFC 8216bis §4.4.5.1 requires of any playlist containing an
EXT-X-DATERANGE (issue #1125 / audit r14-SSAI-W3).
InvalidAssetSource
An interstitial asset source was neither X-ASSET-URI nor
X-ASSET-LIST — Appendix D §D.2 requires exactly one.
NoActiveBreak(String)
crate::session::SessionStore has no record for the session.
BreakAlreadyActive(String)
crate::session::SessionStore::begin_break was called for a
session that already has an unresumed break.
TagParse(String)
An Interstitial EXT-X-DATERANGE tag line failed to parse.
HlsAttrValue(Error)
An attribute value supplied by the crate::decision::AdDecisionProvider
(a URI, an ID, or any other ad-server-controlled string) could not
be represented as an RFC 8216 §4.2 quoted-string — contains ", CR or
LF (issue #1140 / audit r14-SSAI-W1): rendering an ad-decision
response straight into the playlist without validation let a " or
a newline in, e.g., an ad URI terminate the attribute list and inject
arbitrary tag lines into every viewer’s session playlist.
InvalidDuration
A DURATION/X-RESUME-OFFSET/X-PLAYOUT-LIMIT value was NaN,
infinite, or negative (issue #1140 / audit r14-SSAI-W4). RFC 8216
decimal-floating-point is non-negative and finite; NaN as i64 == 0
let a NaN duration render as the bare token NaN.
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()