pub(crate) struct Channel<T> {
pub(crate) queue: ConcurrentQueue<T>,
pub(crate) send_ops: Event,
pub(crate) recv_ops: Event,
pub(crate) stream_ops: Event,
pub(crate) closed_ops: Event,
pub(crate) sender_count: AtomicUsize,
pub(crate) receiver_count: AtomicUsize,
}Fields§
§queue: ConcurrentQueue<T>Inner message queue.
send_ops: EventSend operations waiting while the channel is full.
recv_ops: EventReceive operations waiting while the channel is empty and not closed.
stream_ops: EventStream operations while the channel is empty and not closed.
closed_ops: EventClosed operations while the channel is not closed.
sender_count: AtomicUsizeThe number of currently active Senders.
receiver_count: AtomicUsizeThe number of currently active Receiverss.
Implementations§
Auto Trait Implementations§
impl<T> !Freeze for Channel<T>
impl<T> RefUnwindSafe for Channel<T>
impl<T> Send for Channel<T>where
T: Send,
impl<T> Sync for Channel<T>where
T: Send,
impl<T> Unpin for Channel<T>where
T: Unpin,
impl<T> UnwindSafe for Channel<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