Struct rdkafka::producer::future_producer::FutureRecord[][src]

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>,
}

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

impl<'a, K: ToBytes + ?Sized, P: ToBytes + ?Sized> FutureRecord<'a, K, P>[src]

pub fn to(topic: &'a str) -> FutureRecord<'a, K, P>[src]

Creates a new record with the specified topic name.

pub fn partition(self, partition: i32) -> FutureRecord<'a, K, P>[src]

Sets the destination partition of the record.

pub fn payload(self, payload: &'a P) -> FutureRecord<'a, K, P>[src]

Sets the destination payload of the record.

pub fn key(self, key: &'a K) -> FutureRecord<'a, K, P>[src]

Sets the destination key of the record.

pub fn timestamp(self, timestamp: i64) -> FutureRecord<'a, K, P>[src]

Sets the destination timestamp of the record.

pub fn headers(self, headers: OwnedHeaders) -> FutureRecord<'a, K, P>[src]

Sets the headers of the record.

Trait Implementations

impl<'a, K: Debug + ToBytes + ?Sized, P: Debug + ToBytes + ?Sized> Debug for FutureRecord<'a, K, P>[src]

Auto Trait Implementations

impl<'a, K: ?Sized, P: ?Sized> RefUnwindSafe for FutureRecord<'a, K, P> where
    K: RefUnwindSafe,
    P: RefUnwindSafe

impl<'a, K: ?Sized, P: ?Sized> Send for FutureRecord<'a, K, P> where
    K: Sync,
    P: Sync

impl<'a, K: ?Sized, P: ?Sized> Sync for FutureRecord<'a, K, P> where
    K: Sync,
    P: Sync

impl<'a, K: ?Sized, P: ?Sized> Unpin for FutureRecord<'a, K, P>

impl<'a, K: ?Sized, P: ?Sized> UnwindSafe for FutureRecord<'a, K, P> where
    K: RefUnwindSafe,
    P: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.