pub struct Map<'a> { /* private fields */ }Expand description
Corresponds to the #EXT-X-MAP tag.
https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-18#section-4.4.4.5
Implementations§
Source§impl<'a> Map<'a>
impl<'a> Map<'a>
Sourcepub fn builder() -> MapBuilder<'a, MapUriNeedsToBeSet>
pub fn builder() -> MapBuilder<'a, MapUriNeedsToBeSet>
Starts a builder for producing Self.
For example, we could construct a Map as such:
let map = Map::builder()
.with_uri("uri")
.with_byterange(MapByterange { length: 1024, offset: 0 })
.finish();Note that the finish method is only callable if the builder has set uri. The following
will fail to compile:
let map = Map::builder().finish();Sourcepub fn uri(&self) -> &str
pub fn uri(&self) -> &str
Corresponds to the URI attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn byterange(&self) -> Option<MapByterange>
pub fn byterange(&self) -> Option<MapByterange>
Corresponds to the BYTERANGE attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn set_uri(&mut self, uri: impl Into<Cow<'a, str>>)
pub fn set_uri(&mut self, uri: impl Into<Cow<'a, str>>)
Sets the URI attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn set_byterange(&mut self, byterange: MapByterange)
pub fn set_byterange(&mut self, byterange: MapByterange)
Sets the BYTERANGE attribute.
See Self for a link to the HLS documentation for this attribute.
Sourcepub fn unset_byterange(&mut self)
pub fn unset_byterange(&mut self)
Unsets the BYTERANGE attribute (set it to None).
See Self for a link to the HLS documentation for this attribute.
Trait Implementations§
Source§impl<'a> IntoInnerTag<'a> for Map<'a>
impl<'a> IntoInnerTag<'a> for Map<'a>
Source§fn into_inner(self) -> TagInner<'a>
fn into_inner(self) -> TagInner<'a>
self and provide TagInner.