pub struct KafkaMessage { /* private fields */ }Expand description
Kafka Message.
Implementations§
Source§impl KafkaMessage
impl KafkaMessage
Sourcepub fn with_topic(self, topic: impl Into<String>) -> Self
pub fn with_topic(self, topic: impl Into<String>) -> Self
Sets topic and returns the updated value.
Sourcepub fn with_partition(self, partition: i32) -> Self
pub fn with_partition(self, partition: i32) -> Self
Sets partition and returns the updated value.
Sourcepub fn with_timestamp(self, timestamp: i64) -> Self
pub fn with_timestamp(self, timestamp: i64) -> Self
Sets timestamp and returns the updated value.
Sourcepub fn with_null_value(self) -> Self
pub fn with_null_value(self) -> Self
Sets null value and returns the updated value.
Sourcepub fn with_header(self, header: RecordHeader) -> Self
pub fn with_header(self, header: RecordHeader) -> Self
Sets header and returns the updated value.
Sourcepub fn with_headers<I>(self, headers: I) -> Selfwhere
I: IntoIterator<Item = RecordHeader>,
pub fn with_headers<I>(self, headers: I) -> Selfwhere
I: IntoIterator<Item = RecordHeader>,
Sets headers and returns the updated value.
Sourcepub fn into_record(
self,
default_topic: Option<&str>,
default_partition: Option<i32>,
) -> Result<ProduceRecord>
pub fn into_record( self, default_topic: Option<&str>, default_partition: Option<i32>, ) -> Result<ProduceRecord>
Converts this value into record.
Trait Implementations§
Source§impl Clone for KafkaMessage
impl Clone for KafkaMessage
Source§fn clone(&self) -> KafkaMessage
fn clone(&self) -> KafkaMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KafkaMessage
impl Debug for KafkaMessage
Source§impl From<ProduceRecord> for KafkaMessage
impl From<ProduceRecord> for KafkaMessage
Source§fn from(record: ProduceRecord) -> Self
fn from(record: ProduceRecord) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for KafkaMessage
impl RefUnwindSafe for KafkaMessage
impl Send for KafkaMessage
impl Sync for KafkaMessage
impl Unpin for KafkaMessage
impl UnsafeUnpin for KafkaMessage
impl UnwindSafe for KafkaMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more