pub struct FanInBuffer<T, const N: usize, const PRODUCERS: usize>where
T: Transcendental,{ /* private fields */ }Expand description
Buffer for mixing multiple producers to one consumer
Implementations§
Source§impl<T, const N: usize, const PRODUCERS: usize> FanInBuffer<T, N, PRODUCERS>where
T: Transcendental,
impl<T, const N: usize, const PRODUCERS: usize> FanInBuffer<T, N, PRODUCERS>where
T: Transcendental,
Sourcepub fn new() -> FanInBuffer<T, N, PRODUCERS>
pub fn new() -> FanInBuffer<T, N, PRODUCERS>
Create new fan-in buffer
Sourcepub const fn producer_count(&self) -> usize
pub const fn producer_count(&self) -> usize
Get number of producers
Sourcepub fn producer_has_data(&self, producer_id: usize) -> bool
pub fn producer_has_data(&self, producer_id: usize) -> bool
Check if producer has new data
Sourcepub fn clear_producer(&self, producer_id: usize)
pub fn clear_producer(&self, producer_id: usize)
Clear specific producer
Trait Implementations§
Source§impl<T, const N: usize, const PRODUCERS: usize> Clone for FanInBuffer<T, N, PRODUCERS>where
T: Transcendental + Copy,
impl<T, const N: usize, const PRODUCERS: usize> Clone for FanInBuffer<T, N, PRODUCERS>where
T: Transcendental + Copy,
Source§fn clone(&self) -> FanInBuffer<T, N, PRODUCERS>
fn clone(&self) -> FanInBuffer<T, N, PRODUCERS>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T, const N: usize, const PRODUCERS: usize> Debug for FanInBuffer<T, N, PRODUCERS>where
T: Transcendental + Debug,
impl<T, const N: usize, const PRODUCERS: usize> Debug for FanInBuffer<T, N, PRODUCERS>where
T: Transcendental + Debug,
Source§impl<T, const N: usize, const PRODUCERS: usize> Default for FanInBuffer<T, N, PRODUCERS>where
T: Transcendental,
impl<T, const N: usize, const PRODUCERS: usize> Default for FanInBuffer<T, N, PRODUCERS>where
T: Transcendental,
Source§fn default() -> FanInBuffer<T, N, PRODUCERS>
fn default() -> FanInBuffer<T, N, PRODUCERS>
Returns the “default value” for a type. Read more
Source§impl<T, const N: usize, const PRODUCERS: usize> SignalBuffer<T> for FanInBuffer<T, N, PRODUCERS>where
T: Transcendental,
impl<T, const N: usize, const PRODUCERS: usize> SignalBuffer<T> for FanInBuffer<T, N, PRODUCERS>where
T: Transcendental,
Source§fn stats(&self) -> BufferStats
fn stats(&self) -> BufferStats
Get a snapshot of current buffer statistics
Source§fn reset_stats(&mut self)
fn reset_stats(&mut self)
Reset all statistics to zero Read more
Auto Trait Implementations§
impl<T, const N: usize, const PRODUCERS: usize> !Freeze for FanInBuffer<T, N, PRODUCERS>
impl<T, const N: usize, const PRODUCERS: usize> !RefUnwindSafe for FanInBuffer<T, N, PRODUCERS>
impl<T, const N: usize, const PRODUCERS: usize> Send for FanInBuffer<T, N, PRODUCERS>
impl<T, const N: usize, const PRODUCERS: usize> Sync for FanInBuffer<T, N, PRODUCERS>
impl<T, const N: usize, const PRODUCERS: usize> Unpin for FanInBuffer<T, N, PRODUCERS>where
T: Unpin,
impl<T, const N: usize, const PRODUCERS: usize> UnsafeUnpin for FanInBuffer<T, N, PRODUCERS>where
T: UnsafeUnpin,
impl<T, const N: usize, const PRODUCERS: usize> UnwindSafe for FanInBuffer<T, N, PRODUCERS>where
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