pub struct BlockingMpscSender<T, const P: usize, const NUM_SEGS_P2: usize> { /* private fields */ }Expand description
Blocking MPSC sender.
Multiple blocking senders can be created and used concurrently. They share the same waker infrastructure as async senders, allowing perfect interoperability.
Implementations§
Source§impl<T, const P: usize, const NUM_SEGS_P2: usize> BlockingMpscSender<T, P, NUM_SEGS_P2>
impl<T, const P: usize, const NUM_SEGS_P2: usize> BlockingMpscSender<T, P, NUM_SEGS_P2>
pub fn try_send(&mut self, value: T) -> Result<(), PushError<T>>
Sourcepub fn send(&mut self, value: T) -> Result<(), PushError<T>>
pub fn send(&mut self, value: T) -> Result<(), PushError<T>>
Blocking send that parks the thread until space is available.
Sourcepub fn send_slice(
&mut self,
values: Vec<T>,
) -> Result<Vec<T>, PushError<Vec<T>>>
pub fn send_slice( &mut self, values: Vec<T>, ) -> Result<Vec<T>, PushError<Vec<T>>>
Sends multiple items from a slice, blocking until all are sent.
pub fn close(&mut self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<T, const P: usize, const NUM_SEGS_P2: usize> Freeze for BlockingMpscSender<T, P, NUM_SEGS_P2>
impl<T, const P: usize, const NUM_SEGS_P2: usize> !RefUnwindSafe for BlockingMpscSender<T, P, NUM_SEGS_P2>
impl<T, const P: usize, const NUM_SEGS_P2: usize> Send for BlockingMpscSender<T, P, NUM_SEGS_P2>
impl<T, const P: usize, const NUM_SEGS_P2: usize> !Sync for BlockingMpscSender<T, P, NUM_SEGS_P2>
impl<T, const P: usize, const NUM_SEGS_P2: usize> Unpin for BlockingMpscSender<T, P, NUM_SEGS_P2>
impl<T, const P: usize, const NUM_SEGS_P2: usize> !UnwindSafe for BlockingMpscSender<T, P, NUM_SEGS_P2>
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