use alloc::string::String;
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum Error {
#[error(
"no candidate splice boundary within {tolerance_ticks} ticks of requested pts \
{requested_pts} (nearest delta {nearest_delta_ticks} ticks)"
)]
NoAlignedBoundary {
requested_pts: u64,
tolerance_ticks: u64,
nearest_delta_ticks: u64,
},
#[error("no candidate splice boundaries supplied")]
NoCandidates,
#[error("interstitial asset source must be exactly one of X-ASSET-URI or X-ASSET-LIST")]
InvalidAssetSource,
#[error("session {0:?} has no active ad break")]
NoActiveBreak(String),
#[error("session {0:?} already has an active ad break")]
BreakAlreadyActive(String),
#[error("interstitial DATERANGE parse: {0}")]
TagParse(String),
}
pub type Result<T> = core::result::Result<T, Error>;