m3u8_parser::m3u8

Enum Tag

Source
pub enum Tag {
    ExtM3U,
    ExtXVersion(u8),
    ExtInf(f32, Option<String>),
    ExtXTargetDuration(u32),
    ExtXMediaSequence(u64),
    ExtXDiscontinuitySequence(u32),
    ExtXEndList,
    ExtXKey {
        method: String,
        uri: Option<String>,
        iv: Option<String>,
        keyformat: Option<String>,
        keyformatversions: Option<String>,
    },
    ExtXMap {
        uri: String,
        byterange: Option<String>,
    },
    ExtXProgramDateTime(String),
    ExtXDateRange {
        id: String,
        start_date: String,
        end_date: Option<String>,
        duration: Option<f32>,
        planned_duration: Option<f32>,
        scte35_cmd: Option<String>,
        scte35_out: Option<String>,
        scte35_in: Option<String>,
        end_on_next: Option<bool>,
    },
    Uri(String),
}
Expand description

Represents different types of tags found in an M3U8 playlist.

Variants§

§

ExtM3U

Indicates the start of an M3U8 file.

§

ExtXVersion(u8)

Specifies the version of the M3U8 playlist.

§

ExtInf(f32, Option<String>)

Represents a media segment with a duration and an optional title.

§

ExtXTargetDuration(u32)

Indicates the target duration for media segments.

§

ExtXMediaSequence(u64)

Specifies the media sequence number.

§

ExtXDiscontinuitySequence(u32)

Represents a discontinuity sequence number.

§

ExtXEndList

Marks the end of the playlist.

§

ExtXKey

Contains information about encryption keys.

Fields

§method: String
§keyformat: Option<String>
§keyformatversions: Option<String>
§

ExtXMap

Represents a mapping to an initialization segment.

Fields

§byterange: Option<String>
§

ExtXProgramDateTime(String)

Specifies the program date and time.

§

ExtXDateRange

Represents a date range for events within the playlist.

Fields

§start_date: String
§end_date: Option<String>
§duration: Option<f32>
§planned_duration: Option<f32>
§scte35_cmd: Option<String>
§scte35_out: Option<String>
§scte35_in: Option<String>
§end_on_next: Option<bool>
§

Uri(String)

Represents a URI to a media segment.

Trait Implementations§

Source§

impl Debug for Tag

Source§

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

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

impl Display for Tag

Source§

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

Formats the tag as a string for output.

§Arguments
  • f - A mutable reference to a formatter.
§Returns

A result indicating success or failure of formatting.

Source§

impl PartialEq for Tag

Source§

fn eq(&self, other: &Tag) -> 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 Tag

Auto Trait Implementations§

§

impl Freeze for Tag

§

impl RefUnwindSafe for Tag

§

impl Send for Tag

§

impl Sync for Tag

§

impl Unpin for Tag

§

impl UnwindSafe for Tag

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> ToString for T
where T: Display + ?Sized,

Source§

default 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 = 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.