Struct batch_channel::BatchSender
source · pub struct BatchSender<T> { /* private fields */ }Expand description
Automatically sends values on the channel in batches.
Any unsent values are sent upon drop.
Implementations§
source§impl<T> BatchSender<T>
impl<T> BatchSender<T>
sourcepub fn send(&mut self, value: T) -> Result<(), SendError<()>>
pub fn send(&mut self, value: T) -> Result<(), SendError<()>>
Buffers a single value to be sent on the channel.
Sends the batch if the buffer is full.
Trait Implementations§
source§impl<T: Debug> Debug for BatchSender<T>
impl<T: Debug> Debug for BatchSender<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for BatchSender<T>where T: RefUnwindSafe,
impl<T> Send for BatchSender<T>where T: Send,
impl<T> Sync for BatchSender<T>where T: Send + Sync,
impl<T> Unpin for BatchSender<T>where T: Unpin,
impl<T> UnwindSafe for BatchSender<T>where T: UnwindSafe,
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