pub struct StochasticMpmcSender<T>(/* private fields */);
Expand description
Sender for a stochastic MPMC channel. Create one using stochastic_channel()
. This sender can be cheaply cloned, which will increase the sender count. Dropping a sender will decrease the sender count.
Implementations§
Source§impl<T> StochasticMpmcSender<T>
impl<T> StochasticMpmcSender<T>
Sourcepub fn send(&self, val: T) -> Result<(), StochasticMpmcSendError>
pub fn send(&self, val: T) -> Result<(), StochasticMpmcSendError>
Send an item. If there are no receivers, an error is returned.
Trait Implementations§
Source§impl<T> Clone for StochasticMpmcSender<T>
impl<T> Clone for StochasticMpmcSender<T>
Auto Trait Implementations§
impl<T> Freeze for StochasticMpmcSender<T>
impl<T> RefUnwindSafe for StochasticMpmcSender<T>
impl<T> Send for StochasticMpmcSender<T>where
T: Send,
impl<T> Sync for StochasticMpmcSender<T>where
T: Send,
impl<T> Unpin for StochasticMpmcSender<T>
impl<T> UnwindSafe for StochasticMpmcSender<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