Struct kafka_protocol::records::Record
source · pub struct Record {
pub transactional: bool,
pub control: bool,
pub partition_leader_epoch: i32,
pub producer_id: i64,
pub producer_epoch: i16,
pub timestamp_type: TimestampType,
pub offset: i64,
pub sequence: i32,
pub timestamp: i64,
pub key: Option<Bytes>,
pub value: Option<Bytes>,
pub headers: IndexMap<StrBytes, Option<Bytes>>,
}Expand description
A Kafka message containing key, payload value, and all associated metadata.
Fields§
§transactional: boolWhether this record is transactional.
control: boolWhether this record is a control message, which should not be exposed to the client.
partition_leader_epoch: i32Epoch of the leader for this record ’s partition.
producer_id: i64The identifier of the producer.
producer_epoch: i16Producer metadata used to implement transactional writes.
timestamp_type: TimestampTypeIndicates whether timestamp represents record creation or appending to the log.
offset: i64Message offset within a partition.
sequence: i32Sequence identifier used for idempotent delivery.
timestamp: i64Timestamp the record. See also timestamp_type.
key: Option<Bytes>The key of the record.
value: Option<Bytes>The payload of the record.
headers: IndexMap<StrBytes, Option<Bytes>>Headers associated with the record’s payload.
Trait Implementations§
impl Eq for Record
impl StructuralPartialEq for Record
Auto Trait Implementations§
impl !Freeze for Record
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnwindSafe for Record
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.