m3u8_parser::m3u8::validation

Enum ValidationError

Source
pub enum ValidationError {
Show 13 variants MissingExtM3U, InvalidVersion(u8), InvalidDuration(f32), InvalidTargetDuration(u32), InvalidMediaSequence(u64), InvalidKeyMethod(String), InvalidMapUri, InvalidProgramDateTime, InvalidDateRangeId, InvalidDateRangeStartDate, InvalidDateRangeEndDate, InvalidDateRangeDuration(f32), InvalidDateRangePlannedDuration(f32),
}
Expand description

Represents different types of validation errors that can occur when processing an M3U8 playlist.

This enum is used to capture specific validation issues that may arise when checking the conformity of a playlist to the M3U8 specification. Each variant represents a distinct error that provides context for what went wrong during validation.

Variants§

§

MissingExtM3U

Error indicating that the #EXTM3U tag is missing from the playlist.

§

InvalidVersion(u8)

Error indicating that the specified version is invalid.

§Arguments

  • u8 - The invalid version number that was encountered.
§

InvalidDuration(f32)

Error indicating that the duration specified is invalid.

§Arguments

  • f32 - The invalid duration value that was encountered.
§

InvalidTargetDuration(u32)

Error indicating that the target duration specified is invalid.

§Arguments

  • u32 - The invalid target duration value that was encountered.
§

InvalidMediaSequence(u64)

Error indicating that the media sequence number specified is invalid.

§Arguments

  • u64 - The invalid media sequence number that was encountered.
§

InvalidKeyMethod(String)

Error indicating that an invalid key method was specified.

§Arguments

  • String - The invalid key method that was encountered.
§

InvalidMapUri

Error indicating that the URI specified in a map tag is invalid.

§

InvalidProgramDateTime

Error indicating that the program date and time specified is invalid.

§

InvalidDateRangeId

Error indicating that the ID specified in a date range is invalid.

§

InvalidDateRangeStartDate

Error indicating that the start date specified in a date range is invalid.

§

InvalidDateRangeEndDate

Error indicating that the end date specified in a date range is invalid.

§

InvalidDateRangeDuration(f32)

Error indicating that the duration specified in a date range is invalid.

§Arguments

  • f32 - The invalid duration value that was encountered in the date range.
§

InvalidDateRangePlannedDuration(f32)

Error indicating that the planned duration specified in a date range is invalid.

§Arguments

  • f32 - The invalid planned duration value that was encountered in the date range.

Trait Implementations§

Source§

impl Debug for ValidationError

Source§

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

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

impl PartialEq for ValidationError

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for ValidationError

Auto Trait Implementations§

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.