[][src]Struct hls_m3u8::tags::ExtXStart

pub struct ExtXStart { /* fields omitted */ }

This tag indicates a preferred point at which to start playing a Playlist.

By default, clients should start playback at this point when beginning a playback session.

Methods

impl ExtXStart[src]

#[must_use]pub fn time_offset(&self) -> Float[src]

The time offset of the MediaSegments in the playlist.

Example

use hls_m3u8::types::Float;

let mut start = ExtXStart::new(Float::new(20.123456));

start.set_time_offset(Float::new(1.0));
assert_eq!(start.time_offset(), Float::new(1.0));

pub fn set_time_offset(&mut self, value: Float) -> &mut Self[src]

The time offset of the MediaSegments in the playlist.

Example

use hls_m3u8::types::Float;

let mut start = ExtXStart::new(Float::new(20.123456));

start.set_time_offset(Float::new(1.0));
assert_eq!(start.time_offset(), Float::new(1.0));

#[must_use]pub fn is_precise(&self) -> bool[src]

Whether clients should not render media stream whose presentation times are prior to the specified time offset.

Example

use hls_m3u8::types::Float;

let mut start = ExtXStart::new(Float::new(20.123456));
start.set_is_precise(true);

assert_eq!(start.is_precise(), true);

pub fn set_is_precise(&mut self, value: bool) -> &mut Self[src]

Whether clients should not render media stream whose presentation times are prior to the specified time offset.

Example

use hls_m3u8::types::Float;

let mut start = ExtXStart::new(Float::new(20.123456));
start.set_is_precise(true);

assert_eq!(start.is_precise(), true);

impl ExtXStart[src]

#[must_use]pub const fn new(time_offset: Float) -> Self[src]

Makes a new ExtXStart tag.

Example

use hls_m3u8::types::Float;

let start = ExtXStart::new(Float::new(20.123456));

#[must_use]pub const fn with_precise(time_offset: Float, is_precise: bool) -> Self[src]

Makes a new ExtXStart tag with the given precise flag.

Example

use hls_m3u8::types::Float;

let start = ExtXStart::with_precise(Float::new(20.123456), true);
assert_eq!(start.is_precise(), true);

Trait Implementations

impl Clone for ExtXStart[src]

impl Copy for ExtXStart[src]

impl Debug for ExtXStart[src]

impl Display for ExtXStart[src]

impl Eq for ExtXStart[src]

impl FromStr for ExtXStart[src]

type Err = Error

The associated error which can be returned from parsing.

impl Hash for ExtXStart[src]

impl Ord for ExtXStart[src]

impl PartialEq<ExtXStart> for ExtXStart[src]

impl PartialOrd<ExtXStart> for ExtXStart[src]

impl StructuralEq for ExtXStart[src]

impl StructuralPartialEq for ExtXStart[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.