pub struct Channel<T, S: SwapSlot<T>> { /* private fields */ }Implementations§
Source§impl<T, S: SwapSlot<T>> Channel<T, S>
impl<T, S: SwapSlot<T>> Channel<T, S>
Sourcepub fn broadcast(&self, object: T) -> Result<(), SendError<T>>
pub fn broadcast(&self, object: T) -> Result<(), SendError<T>>
Publishes values to the circular buffer at wi % size
§Arguments
object- owned object to be published
Sourcepub fn try_recv(
&self,
ri: &AtomicCounter,
skip_items: usize,
) -> Result<Arc<T>, TryRecvError>
pub fn try_recv( &self, ri: &AtomicCounter, skip_items: usize, ) -> Result<Arc<T>, TryRecvError>
Receives some atomic reference to an object if queue is not empty, or None if it is. Never Blocks
Sourcepub fn inc_sub_count(&self)
pub fn inc_sub_count(&self)
Increment the number of subs
Sourcepub fn dec_sub_count(&self)
pub fn dec_sub_count(&self)
Decrement the number of subs
Trait Implementations§
Auto Trait Implementations§
impl<T, S> !Freeze for Channel<T, S>
impl<T, S> RefUnwindSafe for Channel<T, S>where
T: RefUnwindSafe,
S: RefUnwindSafe,
impl<T, S> Send for Channel<T, S>
impl<T, S> Sync for Channel<T, S>
impl<T, S> Unpin for Channel<T, S>
impl<T, S> UnsafeUnpin for Channel<T, S>
impl<T, S> UnwindSafe for Channel<T, S>where
T: UnwindSafe,
S: 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