pub struct MeterConsumer { /* private fields */ }Expand description
Consumer side of meter channel (UI thread).
Not real-time safe (can allocate), but non-blocking on audio thread.
Implementations§
Source§impl MeterConsumer
impl MeterConsumer
Sourcepub fn read_latest(&mut self) -> Option<MeterFrame>
pub fn read_latest(&mut self) -> Option<MeterFrame>
Read the latest meter frame, discarding all older frames.
Returns None if no frames are available.
Efficient for UI polling: only processes most recent data.
Sourcepub fn pop(&mut self) -> Option<MeterFrame>
pub fn pop(&mut self) -> Option<MeterFrame>
Pop the oldest meter frame from the buffer.
Returns None if no frames are available.
Sourcepub fn available_read(&self) -> usize
pub fn available_read(&self) -> usize
Returns the number of frames available to read.
Auto Trait Implementations§
impl !Freeze for MeterConsumer
impl !RefUnwindSafe for MeterConsumer
impl Send for MeterConsumer
impl !Sync for MeterConsumer
impl Unpin for MeterConsumer
impl UnwindSafe for MeterConsumer
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