pub struct SyncBatchSender<'a, T> { /* private fields */ }
Expand description
Automatically batches up values and sends them when a batch is full.
Implementations§
Source§impl<T> SyncBatchSender<'_, T>
impl<T> SyncBatchSender<'_, 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§
Auto Trait Implementations§
impl<'a, T> Freeze for SyncBatchSender<'a, T>
impl<'a, T> RefUnwindSafe for SyncBatchSender<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for SyncBatchSender<'a, T>where
T: Send,
impl<'a, T> Sync for SyncBatchSender<'a, T>
impl<'a, T> Unpin for SyncBatchSender<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for SyncBatchSender<'a, 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