pub struct ConsumerRecord { /* private fields */ }Expand description
Record fetched from a Kafka topic partition.
Implementations§
Source§impl ConsumerRecord
impl ConsumerRecord
Sourcepub fn leader_epoch(&self) -> i32
pub fn leader_epoch(&self) -> i32
Returns the Kafka partition leader epoch attached to this record.
Legacy MessageSet records return -1 because that wire format has no
leader epoch field.
Sourcepub fn timestamp_ms(&self) -> i64
pub fn timestamp_ms(&self) -> i64
Returns the Kafka record timestamp in milliseconds since the Unix epoch.
Sourcepub fn headers(&self) -> &[ConsumerRecordHeader]
pub fn headers(&self) -> &[ConsumerRecordHeader]
Returns the headers attached to this record in wire order.
Trait Implementations§
Source§impl Clone for ConsumerRecord
impl Clone for ConsumerRecord
Source§fn clone(&self) -> ConsumerRecord
fn clone(&self) -> ConsumerRecord
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 ConsumerRecord
impl Debug for ConsumerRecord
impl Eq for ConsumerRecord
Source§impl PartialEq for ConsumerRecord
impl PartialEq for ConsumerRecord
impl StructuralPartialEq for ConsumerRecord
Auto Trait Implementations§
impl Freeze for ConsumerRecord
impl RefUnwindSafe for ConsumerRecord
impl Send for ConsumerRecord
impl Sync for ConsumerRecord
impl Unpin for ConsumerRecord
impl UnsafeUnpin for ConsumerRecord
impl UnwindSafe for ConsumerRecord
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