pub struct SampleSink<T> { /* private fields */ }Expand description
A bounded, non-blocking sink shared between producer and consumer.
Cloning shares the same underlying queue.
Implementations§
Source§impl<T> SampleSink<T>
impl<T> SampleSink<T>
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a sink holding at most capacity samples.
A zero capacity is treated as one: a sink that can never accept anything would report 100% drops and hide whether the consumer was ever working.
Trait Implementations§
Source§impl<T: Clone> Clone for SampleSink<T>
impl<T: Clone> Clone for SampleSink<T>
Source§fn clone(&self) -> SampleSink<T>
fn clone(&self) -> SampleSink<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 moreSource§impl<T: Debug> Debug for SampleSink<T>
impl<T: Debug> Debug for SampleSink<T>
Auto Trait Implementations§
impl<T> Freeze for SampleSink<T>
impl<T> RefUnwindSafe for SampleSink<T>
impl<T> Send for SampleSink<T>where
T: Send,
impl<T> Sync for SampleSink<T>where
T: Send,
impl<T> Unpin for SampleSink<T>
impl<T> UnsafeUnpin for SampleSink<T>
impl<T> UnwindSafe for SampleSink<T>
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