pub struct FutureRecord<'a, K: ToBytes + ?Sized, P: ToBytes + ?Sized> {
    pub topic: &'a str,
    pub partition: Option<i32>,
    pub payload: Option<&'a P>,
    pub key: Option<&'a K>,
    pub timestamp: Option<i64>,
    pub headers: Option<OwnedHeaders>,
}
Expand description

A record for the future producer.

Like BaseRecord, but specific to the FutureProducer. The only difference is that the FutureRecord doesn’t provide custom delivery opaque object.

Fields

topic: &'a str

Required destination topic.

partition: Option<i32>

Optional destination partition.

payload: Option<&'a P>

Optional payload.

key: Option<&'a K>

Optional key.

timestamp: Option<i64>

Optional timestamp.

headers: Option<OwnedHeaders>

Optional message headers.

Implementations

Creates a new record with the specified topic name.

Sets the destination partition of the record.

Sets the destination payload of the record.

Sets the destination key of the record.

Sets the destination timestamp of the record.

Sets the headers of the record.

Trait Implementations

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

Performs the conversion.

Performs the conversion.

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.