pub struct BatchCollector<T> { /* private fields */ }Implementations§
Source§impl<T: Clone> BatchCollector<T>
impl<T: Clone> BatchCollector<T>
pub fn new(config: BatchConfig) -> Self
pub fn add(&self, item: BatchItem<T>) -> BatchAddResult
pub fn add_data(&self, data: T) -> BatchAddResult
pub fn should_flush(&self) -> bool
pub fn drain(&self) -> Vec<BatchItem<T>>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&self)
Auto Trait Implementations§
impl<T> Freeze for BatchCollector<T>
impl<T> RefUnwindSafe for BatchCollector<T>
impl<T> Send for BatchCollector<T>
impl<T> Sync for BatchCollector<T>
impl<T> Unpin for BatchCollector<T>
impl<T> UnwindSafe for BatchCollector<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