#[non_exhaustive]pub struct HlsClientConfig {
pub playlist_url: String,
pub variant_policy: VariantPolicy,
pub playlist_base: Option<String>,
}Expand description
What an HlsClient is configured by: the playlist it follows and how it
chooses variants.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.playlist_url: StringThe Media (or Master) Playlist URL to follow.
variant_policy: VariantPolicyHow a Master Playlist’s variant is chosen.
playlist_base: Option<String>The URL relative playlist URIs resolve against until the first playlist
response says otherwise; None resolves against playlist_url.
Implementations§
Source§impl HlsClientConfig
impl HlsClientConfig
Sourcepub fn new(playlist_url: impl Into<String>) -> Self
pub fn new(playlist_url: impl Into<String>) -> Self
A config following playlist_url with the default VariantPolicy.
Sourcepub fn with_variant_policy(self, variant_policy: VariantPolicy) -> Self
pub fn with_variant_policy(self, variant_policy: VariantPolicy) -> Self
Replace HlsClientConfig::variant_policy.
Sourcepub fn with_playlist_base(self, playlist_base: impl Into<String>) -> Self
pub fn with_playlist_base(self, playlist_base: impl Into<String>) -> Self
Replace HlsClientConfig::playlist_base.
Trait Implementations§
Source§impl Clone for HlsClientConfig
impl Clone for HlsClientConfig
Auto Trait Implementations§
impl Forget for HlsClientConfig
impl Freeze for HlsClientConfig
impl Move for HlsClientConfig
impl RefUnwindSafe for HlsClientConfig
impl Send for HlsClientConfig
impl Sync for HlsClientConfig
impl Unpin for HlsClientConfig
impl UnsafeUnpin for HlsClientConfig
impl UnwindSafe for HlsClientConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more