pub struct BatchingConfig { /* private fields */ }Expand description
Configuration for batching AppendRecords.
Implementations§
Source§impl BatchingConfig
impl BatchingConfig
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new BatchingConfig with default settings.
Sourcepub fn with_linger(self, linger: Duration) -> Self
pub fn with_linger(self, linger: Duration) -> Self
Set the duration for how long to wait for more records before flushing a batch.
Defaults to 5ms.
Sourcepub fn with_max_batch_bytes(
self,
max_batch_bytes: usize,
) -> Result<Self, ValidationError>
pub fn with_max_batch_bytes( self, max_batch_bytes: usize, ) -> Result<Self, ValidationError>
Set the maximum metered bytes per batch.
Note: It must not exceed 1MiB.
Defaults to 1MiB.
Sourcepub fn with_max_batch_records(
self,
max_batch_records: usize,
) -> Result<Self, ValidationError>
pub fn with_max_batch_records( self, max_batch_records: usize, ) -> Result<Self, ValidationError>
Set the maximum number of records per batch.
Note: It must not exceed 1000.
Defaults to 1000.
Trait Implementations§
Source§impl Clone for BatchingConfig
impl Clone for BatchingConfig
Source§fn clone(&self) -> BatchingConfig
fn clone(&self) -> BatchingConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 BatchingConfig
impl Debug for BatchingConfig
Auto Trait Implementations§
impl Freeze for BatchingConfig
impl RefUnwindSafe for BatchingConfig
impl Send for BatchingConfig
impl Sync for BatchingConfig
impl Unpin for BatchingConfig
impl UnwindSafe for BatchingConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more