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: bool

Whether this record is transactional.

control: bool

Whether this record is a control message, which should not be exposed to the client.

partition_leader_epoch: i32

Epoch of the leader for this record ’s partition.

producer_id: i64

The identifier of the producer.

producer_epoch: i16

Producer metadata used to implement transactional writes.

timestamp_type: TimestampType

Indicates whether timestamp represents record creation or appending to the log.

offset: i64

Message offset within a partition.

sequence: i32

Sequence identifier used for idempotent delivery.

timestamp: i64

Timestamp 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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.