pub type DefaultBatch = Batch<DefaultBatchRecords>;
Aliased Type§
pub struct DefaultBatch {
pub base_offset: i64,
pub batch_len: i32,
pub header: BatchHeader,
pub records: Vec<Record<DefaultAsyncBuffer>>,
}
Fields§
§base_offset: i64
§batch_len: i32
§header: BatchHeader
§records: Vec<Record<DefaultAsyncBuffer>>
Implementations
Source§impl<R> Batch<R>where
R: BatchRecords,
impl<R> Batch<R>where
R: BatchRecords,
pub fn get_mut_header(&mut self) -> &mut BatchHeader
pub fn get_header(&self) -> &BatchHeader
pub fn get_base_offset(&self) -> Offset
pub fn set_base_offset(&mut self, offset: Offset)
pub fn base_offset(self, offset: Offset) -> Self
pub fn set_offset_delta(&mut self, delta: i32)
pub fn get_last_offset(&self) -> Offset
Sourcepub fn get_last_offset_delta(&self) -> Size
pub fn get_last_offset_delta(&self) -> Size
get last offset delta
Source§impl Batch<DefaultBatchRecords>
impl Batch<DefaultBatchRecords>
Sourcepub fn add_record(&mut self, record: DefaultRecord)
pub fn add_record(&mut self, record: DefaultRecord)
add new record, this will update the offset to correct