pub struct BoundedContentStore { /* private fields */ }Expand description
Size-bounded store for sample-by-reference frames.
Implementations§
Source§impl BoundedContentStore
impl BoundedContentStore
Sourcepub fn insert(&mut self, frame: ContentFrame) -> Result<Vec<StoreEvicted>>
pub fn insert(&mut self, frame: ContentFrame) -> Result<Vec<StoreEvicted>>
Inserts a frame, evicting oldest frames until the size bound holds.
Sourcepub fn sweep_retention(
&mut self,
now_tick: u64,
adapt_hz: u16,
windows: &[RetentionWindow],
) -> Vec<StoreEvicted>
pub fn sweep_retention( &mut self, now_tick: u64, adapt_hz: u16, windows: &[RetentionWindow], ) -> Vec<StoreEvicted>
Sweeps frames older than their modeled retention window.
Sourcepub fn used_bytes(&self) -> usize
pub fn used_bytes(&self) -> usize
Returns the current byte use.
Trait Implementations§
Source§impl Clone for BoundedContentStore
impl Clone for BoundedContentStore
Source§fn clone(&self) -> BoundedContentStore
fn clone(&self) -> BoundedContentStore
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 BoundedContentStore
impl Debug for BoundedContentStore
Source§impl PartialEq for BoundedContentStore
impl PartialEq for BoundedContentStore
impl StructuralPartialEq for BoundedContentStore
Auto Trait Implementations§
impl Freeze for BoundedContentStore
impl RefUnwindSafe for BoundedContentStore
impl Send for BoundedContentStore
impl Sync for BoundedContentStore
impl Unpin for BoundedContentStore
impl UnsafeUnpin for BoundedContentStore
impl UnwindSafe for BoundedContentStore
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