pub struct BatchConfig {
pub max_rows: usize,
pub max_wait: Duration,
pub initial_buffer_size: usize,
pub max_buffer_size: usize,
pub buffer_shrink_threshold: usize,
pub max_retries: u32,
pub retry_base_delay: Duration,
pub channel_capacity: usize,
}Expand description
Batch configuration
Fields§
§max_rows: usizeMaximum number of rows before automatic flush
max_wait: DurationMaximum wait time before flush
initial_buffer_size: usizeInitial buffer size in bytes
max_buffer_size: usizeMaximum buffer size before backpressure
buffer_shrink_threshold: usizeMaximum buffer capacity to retain after flush (prevents memory leaks) If capacity exceeds this value, the buffer will be reallocated. Defaults to 2 * initial_buffer_size.
max_retries: u32Maximum number of retries on insert failure
retry_base_delay: DurationBase delay between retries (exponential backoff)
channel_capacity: usizeMPSC channel capacity
Implementations§
Source§impl BatchConfig
impl BatchConfig
Sourcepub fn high_throughput() -> Self
pub fn high_throughput() -> Self
High throughput preset
Sourcepub fn low_latency() -> Self
pub fn low_latency() -> Self
Low latency preset
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 moreSource§impl Debug for BatchConfig
impl Debug for BatchConfig
Source§impl Default for BatchConfig
impl Default for BatchConfig
Source§impl PartialEq for BatchConfig
impl PartialEq for BatchConfig
Source§fn eq(&self, other: &BatchConfig) -> bool
fn eq(&self, other: &BatchConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq 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