Struct rdkafka::producer::future_producer::FutureRecord
source · [−]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.