pub struct WriteRecordBatchBuilder { /* private fields */ }Expand description
Builder for writing multiple records across entries in a single request.
Implementations§
Source§impl WriteRecordBatchBuilder
impl WriteRecordBatchBuilder
Sourcepub fn add_record(self, record: Record) -> Self
pub fn add_record(self, record: Record) -> Self
Sourcepub fn append_record(&mut self, record: Record)
pub fn append_record(&mut self, record: Record)
Sourcepub fn add_records(self, records: Vec<Record>) -> Self
pub fn add_records(self, records: Vec<Record>) -> Self
Sourcepub fn append_records(&mut self, records: Vec<Record>)
pub fn append_records(&mut self, records: Vec<Record>)
Sourcepub async fn send(
self,
) -> Result<BTreeMap<(String, u64), ReductError>, ReductError>
pub async fn send( self, ) -> Result<BTreeMap<(String, u64), ReductError>, ReductError>
Sourcepub fn record_count(&self) -> usize
pub fn record_count(&self) -> usize
Get the number of records in the batch.
Sourcepub fn last_access(&self) -> SystemTime
pub fn last_access(&self) -> SystemTime
Get the last time a record was added to the batch.
Can be used for sending the batch after a certain period of time.
Auto Trait Implementations§
impl Freeze for WriteRecordBatchBuilder
impl !RefUnwindSafe for WriteRecordBatchBuilder
impl Send for WriteRecordBatchBuilder
impl Sync for WriteRecordBatchBuilder
impl Unpin for WriteRecordBatchBuilder
impl UnsafeUnpin for WriteRecordBatchBuilder
impl !UnwindSafe for WriteRecordBatchBuilder
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