pub struct ProduceMessage<'a, 'b> {
pub key: Option<&'b [u8]>,
pub value: Option<&'b [u8]>,
pub topic: &'a str,
pub partition: i32,
}
Expand description
Message data to be sent/produced to a particular topic partition.
See KafkaClient::produce_messages
and Producer::send
.
Fields§
§key: Option<&'b [u8]>
The “key” data of this message.
value: Option<&'b [u8]>
The “value” data of this message.
topic: &'a str
The topic to produce this message to.
partition: i32
The partition (of the corresponding topic) to produce this message to.
Implementations§
Trait Implementations§
source§impl<'a, 'b> AsRef<ProduceMessage<'a, 'b>> for ProduceMessage<'a, 'b>
impl<'a, 'b> AsRef<ProduceMessage<'a, 'b>> for ProduceMessage<'a, 'b>
Auto Trait Implementations§
impl<'a, 'b> Freeze for ProduceMessage<'a, 'b>
impl<'a, 'b> RefUnwindSafe for ProduceMessage<'a, 'b>
impl<'a, 'b> Send for ProduceMessage<'a, 'b>
impl<'a, 'b> Sync for ProduceMessage<'a, 'b>
impl<'a, 'b> Unpin for ProduceMessage<'a, 'b>
impl<'a, 'b> UnwindSafe for ProduceMessage<'a, 'b>
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