pub enum ChannelData {
Sender {
tx: Arc<Sender<ValueWord>>,
closed: Arc<AtomicBool>,
},
Receiver {
rx: Arc<Mutex<Receiver<ValueWord>>>,
closed: Arc<AtomicBool>,
},
}Expand description
MPSC channel endpoint (sender or receiver).
A Channel() call creates a sender/receiver pair. Both share the same
underlying mpsc::channel. The sender can be cloned (multi-producer),
while the receiver is wrapped in a Mutex for shared access.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for ChannelData
impl Clone for ChannelData
Source§fn clone(&self) -> ChannelData
fn clone(&self) -> ChannelData
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 moreAuto Trait Implementations§
impl Freeze for ChannelData
impl RefUnwindSafe for ChannelData
impl Send for ChannelData
impl Sync for ChannelData
impl Unpin for ChannelData
impl UnsafeUnpin for ChannelData
impl UnwindSafe for ChannelData
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