pub struct ContentCachePriority(pub u8);Expand description
Numeric priority (higher = more important to keep in cache).
Derived from MediaContentType via ContentCachePriority::for_type.
Tuple Fields§
§0: u8Implementations§
Source§impl ContentCachePriority
impl ContentCachePriority
Sourcepub fn for_type(content_type: &MediaContentType) -> Self
pub fn for_type(content_type: &MediaContentType) -> Self
Compute the priority for the given content type.
| Content type | Priority |
|---|---|
| Manifest | 10 |
| Thumbnail | 8 |
| VideoSegment (bitrate ≥ 4 Mbps) | 7 |
| VideoSegment (bitrate < 4 Mbps) | 6 |
| AudioSegment | 5 |
| Image | 4 |
| Metadata | 3 |
Trait Implementations§
Source§impl Clone for ContentCachePriority
impl Clone for ContentCachePriority
Source§fn clone(&self) -> ContentCachePriority
fn clone(&self) -> ContentCachePriority
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 ContentCachePriority
impl Debug for ContentCachePriority
Source§impl Ord for ContentCachePriority
impl Ord for ContentCachePriority
Source§fn cmp(&self, other: &ContentCachePriority) -> Ordering
fn cmp(&self, other: &ContentCachePriority) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ContentCachePriority
impl PartialEq for ContentCachePriority
Source§fn eq(&self, other: &ContentCachePriority) -> bool
fn eq(&self, other: &ContentCachePriority) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ContentCachePriority
impl PartialOrd for ContentCachePriority
impl Copy for ContentCachePriority
impl Eq for ContentCachePriority
impl StructuralPartialEq for ContentCachePriority
Auto Trait Implementations§
impl Freeze for ContentCachePriority
impl RefUnwindSafe for ContentCachePriority
impl Send for ContentCachePriority
impl Sync for ContentCachePriority
impl Unpin for ContentCachePriority
impl UnsafeUnpin for ContentCachePriority
impl UnwindSafe for ContentCachePriority
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