pub struct BatchConfig {
pub window: Duration,
pub max: usize,
}Expand description
Batching policy for watch_applied.
A flush fires when either bound is hit, whichever comes first: window
time has elapsed since the batch opened, or max updates have accumulated.
The window amortizes the cost of apply (e.g. one route-table clone per
flush instead of one per update); max caps memory and latency when updates
arrive faster than the window.
Fields§
§window: DurationMaximum time a batch stays open before being flushed.
max: usizeMaximum number of parsed updates in a batch before forcing a flush.
Trait Implementations§
Source§impl Clone for BatchConfig
impl Clone for BatchConfig
Source§fn clone(&self) -> BatchConfig
fn clone(&self) -> BatchConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BatchConfig
Source§impl Debug for BatchConfig
impl Debug for BatchConfig
Auto Trait Implementations§
impl Freeze for BatchConfig
impl RefUnwindSafe for BatchConfig
impl Send for BatchConfig
impl Sync for BatchConfig
impl Unpin for BatchConfig
impl UnsafeUnpin for BatchConfig
impl UnwindSafe for BatchConfig
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