Struct worker_pool::WorkerSender
source · [−]pub struct WorkerSender<Up: Send> { /* private fields */ }Expand description
A wrapper around Sender<UpMsg<Up>>. This type implements !Send,
as RecvAllIterator depends on this type being dropped whenever the thread holding it stops or panics.
Implementations
sourceimpl<Up: Send> WorkerSender<Up>
impl<Up: Send> WorkerSender<Up>
sourcepub fn send(&self, msg: Up) -> Result<(), SendError<Up>>
pub fn send(&self, msg: Up) -> Result<(), SendError<Up>>
Sends a value on the channel, blocking if the channel is full.
The value is wrapped in an UpMsg
sourcepub fn try_send(&self, msg: Up) -> Result<(), TrySendError<Up>>
pub fn try_send(&self, msg: Up) -> Result<(), TrySendError<Up>>
Tries to send a value on the channel. If the channel is full, then TrySendError::Full is returned instead.
Trait Implementations
sourceimpl<Up: Clone + Send> Clone for WorkerSender<Up>
impl<Up: Clone + Send> Clone for WorkerSender<Up>
sourcefn clone(&self) -> WorkerSender<Up>
fn clone(&self) -> WorkerSender<Up>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<Up: Debug + Send> Debug for WorkerSender<Up>
impl<Up: Debug + Send> Debug for WorkerSender<Up>
impl<Up: Send> !Send for WorkerSender<Up>
Auto Trait Implementations
impl<Up> RefUnwindSafe for WorkerSender<Up>
impl<Up> Sync for WorkerSender<Up>
impl<Up> Unpin for WorkerSender<Up>
impl<Up> UnwindSafe for WorkerSender<Up>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more