pub struct RecordBatch {
pub base_offset: i64,
pub partition_leader_epoch: i32,
pub attributes: Attributes,
pub last_offset_delta: i32,
pub base_timestamp: i64,
pub max_timestamp: i64,
pub producer_id: i64,
pub producer_epoch: i16,
pub base_sequence: i32,
pub records: Vec<Record>,
}Fields§
§base_offset: i64§partition_leader_epoch: i32§attributes: Attributes§last_offset_delta: i32§base_timestamp: i64§max_timestamp: i64§producer_id: i64§producer_epoch: i16§base_sequence: i32§records: Vec<Record>Implementations§
Source§impl RecordBatch
impl RecordBatch
Sourcepub fn decode<B: Buf>(buf: &mut B) -> Result<Self, RecordsError>
pub fn decode<B: Buf>(buf: &mut B) -> Result<Self, RecordsError>
Decode a complete v2 record batch from buf. Reads from the start of
the header.
Sourcepub fn encode<B: BufMut>(&self, buf: &mut B) -> Result<(), RecordsError>
pub fn encode<B: BufMut>(&self, buf: &mut B) -> Result<(), RecordsError>
Encode this batch into buf.
Sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Predicted total bytes that encode will write (uncompressed; for
compressed batches the actual size will differ).
Trait Implementations§
Source§impl Clone for RecordBatch
impl Clone for RecordBatch
Source§fn clone(&self) -> RecordBatch
fn clone(&self) -> RecordBatch
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 RecordBatch
impl Debug for RecordBatch
Source§impl Decode<'_> for RecordBatch
impl Decode<'_> for RecordBatch
Source§impl Default for RecordBatch
impl Default for RecordBatch
Source§impl Encode for RecordBatch
impl Encode for RecordBatch
impl Eq for RecordBatch
Source§impl From<RecordBatch> for RecordsPayload
impl From<RecordBatch> for RecordsPayload
Source§fn from(rb: RecordBatch) -> Self
fn from(rb: RecordBatch) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RecordBatch
impl PartialEq for RecordBatch
Source§fn eq(&self, other: &RecordBatch) -> bool
fn eq(&self, other: &RecordBatch) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RecordBatch
Auto Trait Implementations§
impl Freeze for RecordBatch
impl RefUnwindSafe for RecordBatch
impl Send for RecordBatch
impl Sync for RecordBatch
impl Unpin for RecordBatch
impl UnsafeUnpin for RecordBatch
impl UnwindSafe for RecordBatch
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