Struct kafka::client::ProduceMessage
[−]
[src]
pub struct ProduceMessage<'a, 'b> { pub key: Option<&'b [u8]>, pub value: Option<&'b [u8]>, pub topic: &'a str, pub partition: i32, }
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.
Methods
impl<'a, 'b> ProduceMessage<'a, 'b>
[src]
fn new(topic: &'a str, partition: i32, key: Option<&'b [u8]>, value: Option<&'b [u8]>) -> Self
A convenient constructor method to create a new produce message with all attributes specified.
Trait Implementations
impl<'a, 'b> Debug for ProduceMessage<'a, 'b>
[src]
impl<'a, 'b> AsRef<ProduceMessage<'a, 'b>> for ProduceMessage<'a, 'b>
[src]
fn as_ref(&self) -> &Self
Performs the conversion.