Skip to main content

Error

Enum Error 

Source
#[non_exhaustive]
pub enum Error {
Show 17 variants MissingAnchor, Scte35EmsgVersionZero, Scte35EmsgVersionZeroConversion,
#[non_exhaustive]
UnsupportedScheme { scheme: String, }, Scte35(Error), Emsg(Error), AttrParse(String), MissingEventId,
#[non_exhaustive]
EmsgTimescaleMismatch { emsg: Timescale, timing: Timescale, }, EmsgZeroTimescale, EmsgPresentationTimeBeforeEpt, EmsgDeltaOverflow(u64), EmsgPresentationTimeOverflow, UnsupportedPresentationTime, HlsAttrValue(Error),
#[non_exhaustive]
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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

MissingAnchor

A wall-clock conversion was attempted without a crate::TimeAnchor.

§

Scte35EmsgVersionZero

SCTE 35 emsg cannot be version 0: ANSI/SCTE 214-1:2024 §7.7.1(2), private/specs-verified/scte/dash/scte-214-1-2024.md.

§

Scte35EmsgVersionZeroConversion

emsg_to_v0 was asked to write a SCTE 35 emsg, which 214-1 2024 §7.7.1(2) forbids.

§

#[non_exhaustive]
UnsupportedScheme

An emsg presented to crate::convert::emsg_to_scte35 is not a SCTE-35 carriage scheme.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§scheme: String

The emsg scheme_id_uri that was rejected, verbatim.

§

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).

§

#[non_exhaustive]
EmsgTimescaleMismatch

emsg ↔ SegmentTiming timescale mismatch.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§emsg: Timescale

The timescale declared by the emsg box.

§timing: Timescale

The timescale declared by the DASH SegmentTiming.

§

EmsgZeroTimescale

The emsg states a timescale of 0, which no time can be read in.

§

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.

§

#[non_exhaustive]
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

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§what: &'static str

Which attribute failed ("DURATION" or "PLANNED-DURATION").

§value: f64

The offending value.

§

TimestampOutOfRange(i64)

A wall-clock instant is outside the range RFC 3339 formatting supports (years -9999..=9999).

Trait Implementations§

Source§

impl Clone for Error

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Replaced by Error::source.
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Error

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Error

Auto Trait Implementations§

§

impl Forget for Error

§

impl Freeze for Error

§

impl Move for Error

§

impl RefUnwindSafe for Error

§

impl Send for Error
where RawVecInner: Send, &'static str: Send, BoxRaw<Damage>: Send, NonZero<u32>: Send,

§

impl Sync for Error
where RawVecInner: Sync, BoxRaw<Damage>: Sync, NonZero<u32>: Sync,

§

impl Unpin for Error
where *const u8 is !null: Unpin, &'static str: Unpin, Box<Damage>: Unpin, NonZero<u32>: Unpin,

§

impl UnsafeUnpin for Error

§

impl UnwindSafe for Error
where RawVecInner: UnwindSafe, &'static str: UnwindSafe, BoxRaw<Damage>: UnwindSafe, NonZero<u32>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.