Struct hls_m3u8::tags::ExtInf [−][src]
pub struct ExtInf<'a> { /* fields omitted */ }
Expand description
Specifies the duration of a Media Segment
.
Implementations
Returns the duration of the associated media segment.
Example
use std::time::Duration; let ext_inf = ExtInf::new(Duration::from_secs(5)); assert_eq!(ext_inf.duration(), Duration::from_secs(5));
Sets the duration of the associated media segment.
Example
use std::time::Duration; let mut ext_inf = ExtInf::new(Duration::from_secs(5)); ext_inf.set_duration(Duration::from_secs(10)); assert_eq!(ext_inf.duration(), Duration::from_secs(10));
Returns the title of the associated media segment.
Example
use std::time::Duration; let ext_inf = ExtInf::with_title(Duration::from_secs(5), "title"); assert_eq!(ext_inf.title(), &Some("title".into()));
Sets the title of the associated media segment.
Example
use std::time::Duration; let mut ext_inf = ExtInf::with_title(Duration::from_secs(5), "title"); ext_inf.set_title(Some("better title")); assert_eq!(ext_inf.title(), &Some("better title".into()));
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for ExtInf<'a>
impl<'a> UnwindSafe for ExtInf<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more