[−][src]Struct hls_m3u8::tags::ExtXDateRange
The ExtXDateRange
tag associates a date range (i.e., a range of time
defined by a starting and ending date) with a set of attribute/value pairs.
Fields
duration: Option<Duration>
The duration of the ExtXDateRange
. A single instant in time (e.g.,
crossing a finish line) should be represented with a duration of 0.
Note
This field is optional.
planned_duration: Option<Duration>
This field indicates the expected duration of an ExtXDateRange
,
whose actual duration is not yet known.
Note
This field is optional.
end_on_next: bool
This field indicates that the ExtXDateRange::end_date
is equal to
the ExtXDateRange::start_date
of the following range.
The following range is the ExtXDateRange
with the same class, that
has the earliest start date after the start date of the range in
question.
Note
This field is optional.
client_attributes: BTreeMap<String, Value>
The "X-"
prefix defines a namespace reserved for client-defined
attributes.
A client-attribute can only consist of uppercase characters (A-Z),
numbers (0-9) and -
.
Clients should use a reverse-dns naming scheme, when defining their own attribute names to avoid collisions.
An example of a client-defined attribute is
X-COM-EXAMPLE-AD-ID="XYZ123"
.
Note
This field is optional.
Methods
impl ExtXDateRange
[src]
#[must_use]pub fn id(&self) -> &String
[src]
pub fn set_id<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
#[must_use]pub fn class(&self) -> Option<&String>
[src]
A client-defined string that specifies some set of attributes and their
associated value semantics. All ExtXDateRange
s with the same class
attribute value must adhere to these semantics.
Note
This field is optional.
pub fn set_class<VALUE: Into<String>>(
&mut self,
value: Option<VALUE>
) -> &mut Self
[src]
&mut self,
value: Option<VALUE>
) -> &mut Self
A client-defined string that specifies some set of attributes and their
associated value semantics. All ExtXDateRange
s with the same class
attribute value must adhere to these semantics.
Note
This field is optional.
#[must_use]pub fn start_date(&self) -> Option<&String>
[src]
The date at which the ExtXDateRange
begins.
Note
This field is required by the spec wording, but optional in examples elsewhere in the same document. Some implementations omit it in practise (e.g. for SCTE 'explicit-IN' markers) so it is optional here.
pub fn set_start_date<VALUE: Into<String>>(
&mut self,
value: Option<VALUE>
) -> &mut Self
[src]
&mut self,
value: Option<VALUE>
) -> &mut Self
The date at which the ExtXDateRange
begins.
Note
This field is required by the spec wording, but optional in examples elsewhere in the same document. Some implementations omit it in practise (e.g. for SCTE 'explicit-IN' markers) so it is optional here.
#[must_use]pub fn end_date(&self) -> Option<&String>
[src]
The date at which the ExtXDateRange
ends. It must be equal to or
later than the value of the start-date field.
Note
This field is optional.
pub fn set_end_date<VALUE: Into<String>>(
&mut self,
value: Option<VALUE>
) -> &mut Self
[src]
&mut self,
value: Option<VALUE>
) -> &mut Self
The date at which the ExtXDateRange
ends. It must be equal to or
later than the value of the start-date field.
Note
This field is optional.
#[must_use]pub fn scte35_cmd(&self) -> Option<&String>
[src]
SCTE-35 (ANSI/SCTE 35 2013) is a joint ANSI/Society of Cable and Telecommunications Engineers standard that describes the inline insertion of cue tones in mpeg-ts streams.
SCTE-35 was originally used in the US to signal a local ad insertion opportunity in the transport streams, and in Europe to insert local TV programs (e.g. local news transmissions). It is now used to signal all kinds of program and ad events in linear transport streams and in newer ABR delivery formats such as HLS and DASH.
https://en.wikipedia.org/wiki/SCTE-35
Note
This field is optional.
pub fn set_scte35_cmd<VALUE: Into<String>>(
&mut self,
value: Option<VALUE>
) -> &mut Self
[src]
&mut self,
value: Option<VALUE>
) -> &mut Self
SCTE-35 (ANSI/SCTE 35 2013) is a joint ANSI/Society of Cable and Telecommunications Engineers standard that describes the inline insertion of cue tones in mpeg-ts streams.
SCTE-35 was originally used in the US to signal a local ad insertion opportunity in the transport streams, and in Europe to insert local TV programs (e.g. local news transmissions). It is now used to signal all kinds of program and ad events in linear transport streams and in newer ABR delivery formats such as HLS and DASH.
https://en.wikipedia.org/wiki/SCTE-35
Note
This field is optional.
#[must_use]pub fn scte35_out(&self) -> Option<&String>
[src]
SCTE-35 (ANSI/SCTE 35 2013) is a joint ANSI/Society of Cable and Telecommunications Engineers standard that describes the inline insertion of cue tones in mpeg-ts streams.
SCTE-35 was originally used in the US to signal a local ad insertion opportunity in the transport streams, and in Europe to insert local TV programs (e.g. local news transmissions). It is now used to signal all kinds of program and ad events in linear transport streams and in newer ABR delivery formats such as HLS and DASH.
https://en.wikipedia.org/wiki/SCTE-35
Note
This field is optional.
pub fn set_scte35_out<VALUE: Into<String>>(
&mut self,
value: Option<VALUE>
) -> &mut Self
[src]
&mut self,
value: Option<VALUE>
) -> &mut Self
SCTE-35 (ANSI/SCTE 35 2013) is a joint ANSI/Society of Cable and Telecommunications Engineers standard that describes the inline insertion of cue tones in mpeg-ts streams.
SCTE-35 was originally used in the US to signal a local ad insertion opportunity in the transport streams, and in Europe to insert local TV programs (e.g. local news transmissions). It is now used to signal all kinds of program and ad events in linear transport streams and in newer ABR delivery formats such as HLS and DASH.
https://en.wikipedia.org/wiki/SCTE-35
Note
This field is optional.
#[must_use]pub fn scte35_in(&self) -> Option<&String>
[src]
SCTE-35 (ANSI/SCTE 35 2013) is a joint ANSI/Society of Cable and Telecommunications Engineers standard that describes the inline insertion of cue tones in mpeg-ts streams.
SCTE-35 was originally used in the US to signal a local ad insertion opportunity in the transport streams, and in Europe to insert local TV programs (e.g. local news transmissions). It is now used to signal all kinds of program and ad events in linear transport streams and in newer ABR delivery formats such as HLS and DASH.
https://en.wikipedia.org/wiki/SCTE-35
Note
This field is optional.
pub fn set_scte35_in<VALUE: Into<String>>(
&mut self,
value: Option<VALUE>
) -> &mut Self
[src]
&mut self,
value: Option<VALUE>
) -> &mut Self
SCTE-35 (ANSI/SCTE 35 2013) is a joint ANSI/Society of Cable and Telecommunications Engineers standard that describes the inline insertion of cue tones in mpeg-ts streams.
SCTE-35 was originally used in the US to signal a local ad insertion opportunity in the transport streams, and in Europe to insert local TV programs (e.g. local news transmissions). It is now used to signal all kinds of program and ad events in linear transport streams and in newer ABR delivery formats such as HLS and DASH.
https://en.wikipedia.org/wiki/SCTE-35
Note
This field is optional.
#[must_use]pub fn insert_client_attributes(
&mut self,
value_0: String,
value_1: Value
) -> &mut Self
[src]
&mut self,
value_0: String,
value_1: Value
) -> &mut Self
The "X-"
prefix defines a namespace reserved for client-defined
attributes.
A client-attribute can only consist of uppercase characters (A-Z),
numbers (0-9) and -
.
Clients should use a reverse-dns naming scheme, when defining their own attribute names to avoid collisions.
An example of a client-defined attribute is
X-COM-EXAMPLE-AD-ID="XYZ123"
.
Note
This field is optional.
impl ExtXDateRange
[src]
#[must_use]pub fn new<T: Into<String>, I: Into<String>>(id: T, start_date: I) -> Self
[src]
Makes a new ExtXDateRange
tag.
Example
let date_range = ExtXDateRange::new("id", "2010-02-19T14:54:23.031+08:00");
#[must_use]pub fn builder() -> ExtXDateRangeBuilder
[src]
Returns a builder for ExtXDateRange
.
Example
use std::time::Duration; use hls_m3u8::types::Float; let date_range = ExtXDateRange::builder() .id("test_id") .class("test_class") .start_date("2014-03-05T11:15:00Z") .end_date("2014-03-05T11:16:00Z") .duration(Duration::from_secs_f64(60.1)) .planned_duration(Duration::from_secs_f64(59.993)) .insert_client_attribute("X-CUSTOM", Float::new(45.3)) .scte35_cmd("0xFC002F0000000000FF2") .scte35_out("0xFC002F0000000000FF0") .scte35_in("0xFC002F0000000000FF1") .end_on_next(true) .build()?;
Trait Implementations
impl Clone for ExtXDateRange
[src]
fn clone(&self) -> ExtXDateRange
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ExtXDateRange
[src]
impl Display for ExtXDateRange
[src]
impl Eq for ExtXDateRange
[src]
impl FromStr for ExtXDateRange
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(input: &str) -> Result<Self, Self::Err>
[src]
impl Hash for ExtXDateRange
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for ExtXDateRange
[src]
fn cmp(&self, other: &ExtXDateRange) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<ExtXDateRange> for ExtXDateRange
[src]
fn eq(&self, other: &ExtXDateRange) -> bool
[src]
fn ne(&self, other: &ExtXDateRange) -> bool
[src]
impl PartialOrd<ExtXDateRange> for ExtXDateRange
[src]
fn partial_cmp(&self, other: &ExtXDateRange) -> Option<Ordering>
[src]
fn lt(&self, other: &ExtXDateRange) -> bool
[src]
fn le(&self, other: &ExtXDateRange) -> bool
[src]
fn gt(&self, other: &ExtXDateRange) -> bool
[src]
fn ge(&self, other: &ExtXDateRange) -> bool
[src]
impl StructuralEq for ExtXDateRange
[src]
impl StructuralPartialEq for ExtXDateRange
[src]
Auto Trait Implementations
impl RefUnwindSafe for ExtXDateRange
impl Send for ExtXDateRange
impl Sync for ExtXDateRange
impl Unpin for ExtXDateRange
impl UnwindSafe for ExtXDateRange
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,