pub struct BoundedLiveQueue<T> { /* private fields */ }Expand description
Bounded queue used at live audio/control boundaries.
Implementations§
Source§impl<T> BoundedLiveQueue<T>
impl<T> BoundedLiveQueue<T>
Sourcepub fn with_capacity(bound: usize) -> Result<Self>
pub fn with_capacity(bound: usize) -> Result<Self>
Creates a queue bounded to bound items, rejecting a zero bound.
Sourcepub fn push(&mut self, item: T) -> LiveQueuePush
pub fn push(&mut self, item: T) -> LiveQueuePush
Pushes an item, dropping the newest under backpressure when full.
Sourcepub fn allocated_capacity(&self) -> usize
pub fn allocated_capacity(&self) -> usize
Returns the backing buffer’s allocated capacity.
Sourcepub fn dropped(&self) -> u64
pub fn dropped(&self) -> u64
Returns the count of items dropped since the last take_dropped.
Sourcepub fn take_dropped(&mut self) -> u64
pub fn take_dropped(&mut self) -> u64
Returns and clears the pending dropped-item count.
Sourcepub fn stats(&self) -> StreamStats
pub fn stats(&self) -> StreamStats
Returns a snapshot of the queue’s stream statistics.
Trait Implementations§
Source§impl<T: Clone> Clone for BoundedLiveQueue<T>
impl<T: Clone> Clone for BoundedLiveQueue<T>
Source§fn clone(&self) -> BoundedLiveQueue<T>
fn clone(&self) -> BoundedLiveQueue<T>
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 moreAuto Trait Implementations§
impl<T> Freeze for BoundedLiveQueue<T>
impl<T> RefUnwindSafe for BoundedLiveQueue<T>where
VecDeque<T>: RefUnwindSafe,
impl<T> Send for BoundedLiveQueue<T>
impl<T> Sync for BoundedLiveQueue<T>
impl<T> Unpin for BoundedLiveQueue<T>
impl<T> UnsafeUnpin for BoundedLiveQueue<T>where
VecDeque<T>: UnsafeUnpin,
impl<T> UnwindSafe for BoundedLiveQueue<T>where
VecDeque<T>: UnwindSafe,
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