Struct rdkafka::producer::future_producer::FutureRecord [−][src]
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,
K: RefUnwindSafe,
P: RefUnwindSafe,
impl<'a, K: ?Sized, P: ?Sized> Send for FutureRecord<'a, K, P> where
K: Sync,
P: Sync,
K: Sync,
P: Sync,
impl<'a, K: ?Sized, P: ?Sized> Sync for FutureRecord<'a, K, P> where
K: Sync,
P: Sync,
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,
K: RefUnwindSafe,
P: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,