pub struct BatchFlusher<T: Transport> { /* private fields */ }Expand description
Background batch flusher that periodically checks and sends batches.
Implementations§
Source§impl<T: Transport + 'static> BatchFlusher<T>
impl<T: Transport + 'static> BatchFlusher<T>
Sourcepub fn new(
processor: Arc<BatchProcessor>,
transport: Arc<T>,
interval: Duration,
) -> Self
pub fn new( processor: Arc<BatchProcessor>, transport: Arc<T>, interval: Duration, ) -> Self
Create a new batch flusher.
Sourcepub fn start(self) -> FlushHandle
pub fn start(self) -> FlushHandle
Start the background flush loop.
Returns a handle that can be used to stop the flusher.
Auto Trait Implementations§
impl<T> Freeze for BatchFlusher<T>
impl<T> !RefUnwindSafe for BatchFlusher<T>
impl<T> Send for BatchFlusher<T>
impl<T> Sync for BatchFlusher<T>
impl<T> Unpin for BatchFlusher<T>
impl<T> !UnwindSafe for BatchFlusher<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