#[non_exhaustive]pub struct PrefetchConfig {
pub enabled: bool,
pub initial_ad_request_duration: Option<Duration>,
/* private fields */
}Expand description
The configuration for prefetch ads.
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.enabled: boolRequired. Indicates whether the option to prefetch ad requests is enabled.
initial_ad_request_duration: Option<Duration>The duration in seconds of the part of the break to be prefetched. This field is only relevant if prefetch is enabled. You should set this duration to as long as possible to increase the benefits of prefetching, but not longer than the shortest ad break expected. For example, for a live event with 30s and 60s ad breaks, the initial duration should be set to 30s.
Implementations§
Source§impl PrefetchConfig
impl PrefetchConfig
Sourcepub fn set_enabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_enabled<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_initial_ad_request_duration<T>(self, v: T) -> Self
pub fn set_initial_ad_request_duration<T>(self, v: T) -> Self
Sets the value of initial_ad_request_duration.
§Example
ⓘ
use wkt::Duration;
let x = PrefetchConfig::new().set_initial_ad_request_duration(Duration::default()/* use setters */);Sourcepub fn set_or_clear_initial_ad_request_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_initial_ad_request_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of initial_ad_request_duration.
§Example
ⓘ
use wkt::Duration;
let x = PrefetchConfig::new().set_or_clear_initial_ad_request_duration(Some(Duration::default()/* use setters */));
let x = PrefetchConfig::new().set_or_clear_initial_ad_request_duration(None::<Duration>);Trait Implementations§
Source§impl Clone for PrefetchConfig
impl Clone for PrefetchConfig
Source§fn clone(&self) -> PrefetchConfig
fn clone(&self) -> PrefetchConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrefetchConfig
impl Debug for PrefetchConfig
Source§impl Default for PrefetchConfig
impl Default for PrefetchConfig
Source§fn default() -> PrefetchConfig
fn default() -> PrefetchConfig
Returns the “default value” for a type. Read more
Source§impl Message for PrefetchConfig
impl Message for PrefetchConfig
Source§impl PartialEq for PrefetchConfig
impl PartialEq for PrefetchConfig
Source§fn eq(&self, other: &PrefetchConfig) -> bool
fn eq(&self, other: &PrefetchConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PrefetchConfig
Auto Trait Implementations§
impl Freeze for PrefetchConfig
impl RefUnwindSafe for PrefetchConfig
impl Send for PrefetchConfig
impl Sync for PrefetchConfig
impl Unpin for PrefetchConfig
impl UnsafeUnpin for PrefetchConfig
impl UnwindSafe for PrefetchConfig
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