pub struct TimeBasedFlusher { /* private fields */ }
Expand description
Time-based flush manager that handles automatic flushing at regular intervals. This is used internally when FlushPolicy::EveryMillis is configured.
Implementations§
Source§impl TimeBasedFlusher
impl TimeBasedFlusher
Sourcepub fn new<F>(interval_ms: u64, flush_callback: F) -> Option<Self>
pub fn new<F>(interval_ms: u64, flush_callback: F) -> Option<Self>
Create a new time-based flusher with the given interval. Returns None if interval_ms is 0.
Sourcepub fn manual_flush(&self)
pub fn manual_flush(&self)
Manually trigger an immediate flush and update the last flush time.
Sourcepub fn should_flush(&self) -> bool
pub fn should_flush(&self) -> bool
Check if it’s time for a flush based on the interval.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TimeBasedFlusher
impl !RefUnwindSafe for TimeBasedFlusher
impl Send for TimeBasedFlusher
impl Sync for TimeBasedFlusher
impl Unpin for TimeBasedFlusher
impl !UnwindSafe for TimeBasedFlusher
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