pub struct SampleCache(/* private fields */);Expand description
A byte-budgeted cache of compressed samples that several
TrackSampleLoaders can share, so loaders over different parts of one
track - a lazily indexed WebM’s cue spans (issue #692) - hold no more
between them than one budget allows.
Implementations§
Source§impl SampleCache
impl SampleCache
pub fn new(budget_bytes: u64) -> Self
pub fn budget_bytes(&self) -> u64
Sourcepub fn resident_bytes(&self) -> u64
pub fn resident_bytes(&self) -> u64
The compressed bytes every loader sharing the cache holds now, which
never exceeds Self::budget_bytes.
Trait Implementations§
Auto Trait Implementations§
impl Forget for SampleCache
impl Freeze for SampleCache
impl Move for SampleCache
impl RefUnwindSafe for SampleCache
impl Send for SampleCache
impl Sync for SampleCache
impl Unpin for SampleCache
impl UnsafeUnpin for SampleCachewhere
*const ArcInner<Mutex<CacheState>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<CacheState>>>: UnsafeUnpin,
impl UnwindSafe for SampleCache
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