pub struct ServerControl<'a> { /* private fields */ }Expand description
Corresponds to the #EXT-X-SERVER-CONTROL tag.
https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-18#section-4.4.3.8
Implementations§
Source§impl<'a> ServerControl<'a>
impl<'a> ServerControl<'a>
Sourcepub fn builder() -> ServerControlBuilder<ServerControlAttributeNeedsToBeSet>
pub fn builder() -> ServerControlBuilder<ServerControlAttributeNeedsToBeSet>
Starts a builder for producing Self.
For example, we could construct a ServerControl as such:
let server_control = ServerControl::builder()
.with_can_skip_until(36.0)
.with_can_skip_dateranges()
.finish();Note that the finish method is only callable if at least one attribute has been set. The
following will fail to compile:
let server_control = ServerControl::builder().finish();Sourcepub fn can_skip_until(&self) -> Option<f64>
pub fn can_skip_until(&self) -> Option<f64>
Corresponds to the CAN-SKIP-UNTIL attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn can_skip_dateranges(&self) -> bool
pub fn can_skip_dateranges(&self) -> bool
Corresponds to the CAN-SKIP-DATERANGES attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn hold_back(&self) -> Option<f64>
pub fn hold_back(&self) -> Option<f64>
Corresponds to the HOLD-BACK attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn part_hold_back(&self) -> Option<f64>
pub fn part_hold_back(&self) -> Option<f64>
Corresponds to the PART-HOLD-BACK attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn can_block_reload(&self) -> bool
pub fn can_block_reload(&self) -> bool
Corresponds to the CAN-BLOCK-RELOAD attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn set_can_skip_until(&mut self, can_skip_until: f64)
pub fn set_can_skip_until(&mut self, can_skip_until: f64)
Sets the CAN-SKIP-UNTIL attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn unset_can_skip_until(&mut self)
pub fn unset_can_skip_until(&mut self)
Unsets the CAN-SKIP-UNTIL attribute (sets it to None).
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn set_can_skip_dateranges(&mut self, can_skip_dateranges: bool)
pub fn set_can_skip_dateranges(&mut self, can_skip_dateranges: bool)
Sets the CAN-SKIP-DATERANGES attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn set_hold_back(&mut self, hold_back: f64)
pub fn set_hold_back(&mut self, hold_back: f64)
Sets the HOLD-BACK attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn unset_hold_back(&mut self)
pub fn unset_hold_back(&mut self)
Unsets the HOLD-BACK attribute (sets it to None).
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn set_part_hold_back(&mut self, part_hold_back: f64)
pub fn set_part_hold_back(&mut self, part_hold_back: f64)
Sets the PART-HOLD-BACK attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn unset_part_hold_back(&mut self)
pub fn unset_part_hold_back(&mut self)
Unsets the PART-HOLD-BACK attribute (sets it to None).
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn set_can_block_reload(&mut self, can_block_reload: bool)
pub fn set_can_block_reload(&mut self, can_block_reload: bool)
Sets the CAN-BLOCK-RELOAD attribute.
See Self for a link to the HLS documentation for this attribute.
Trait Implementations§
Source§impl<'a> Clone for ServerControl<'a>
impl<'a> Clone for ServerControl<'a>
Source§fn clone(&self) -> ServerControl<'a>
fn clone(&self) -> ServerControl<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for ServerControl<'a>
impl<'a> Debug for ServerControl<'a>
Source§impl<'a, Custom> From<ServerControl<'a>> for HlsLine<'a, Custom>where
Custom: CustomTag<'a>,
impl<'a, Custom> From<ServerControl<'a>> for HlsLine<'a, Custom>where
Custom: CustomTag<'a>,
Source§fn from(tag: ServerControl<'a>) -> Self
fn from(tag: ServerControl<'a>) -> Self
Source§impl<'a> IntoInnerTag<'a> for ServerControl<'a>
impl<'a> IntoInnerTag<'a> for ServerControl<'a>
Source§fn into_inner(self) -> TagInner<'a>
fn into_inner(self) -> TagInner<'a>
self and provide TagInner.