Struct kafka_protocol::messages::produce_request::ProduceRequest
source · #[non_exhaustive]pub struct ProduceRequest {
pub transactional_id: Option<TransactionalId>,
pub acks: i16,
pub timeout_ms: i32,
pub topic_data: IndexMap<TopicName, TopicProduceData>,
pub unknown_tagged_fields: BTreeMap<i32, Bytes>,
}Expand description
Valid versions: 0-10
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.transactional_id: Option<TransactionalId>The transactional ID, or null if the producer is not transactional.
Supported API versions: 3-10
acks: i16The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments, 1 for only the leader and -1 for the full ISR.
Supported API versions: 0-10
timeout_ms: i32The timeout to await a response in milliseconds.
Supported API versions: 0-10
topic_data: IndexMap<TopicName, TopicProduceData>Each topic to produce to.
Supported API versions: 0-10
unknown_tagged_fields: BTreeMap<i32, Bytes>Other tagged fields
Implementations§
source§impl ProduceRequest
impl ProduceRequest
sourcepub fn with_transactional_id(self, value: Option<TransactionalId>) -> Self
pub fn with_transactional_id(self, value: Option<TransactionalId>) -> Self
Sets transactional_id to the passed value.
The transactional ID, or null if the producer is not transactional.
Supported API versions: 3-10
sourcepub fn with_acks(self, value: i16) -> Self
pub fn with_acks(self, value: i16) -> Self
Sets acks to the passed value.
The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments, 1 for only the leader and -1 for the full ISR.
Supported API versions: 0-10
sourcepub fn with_timeout_ms(self, value: i32) -> Self
pub fn with_timeout_ms(self, value: i32) -> Self
Sets timeout_ms to the passed value.
The timeout to await a response in milliseconds.
Supported API versions: 0-10
sourcepub fn with_topic_data(
self,
value: IndexMap<TopicName, TopicProduceData>,
) -> Self
pub fn with_topic_data( self, value: IndexMap<TopicName, TopicProduceData>, ) -> Self
Sets topic_data to the passed value.
Each topic to produce to.
Supported API versions: 0-10
sourcepub fn with_unknown_tagged_fields(self, value: BTreeMap<i32, Bytes>) -> Self
pub fn with_unknown_tagged_fields(self, value: BTreeMap<i32, Bytes>) -> Self
Sets unknown_tagged_fields to the passed value.
sourcepub fn with_unknown_tagged_field(self, key: i32, value: Bytes) -> Self
pub fn with_unknown_tagged_field(self, key: i32, value: Bytes) -> Self
Inserts an entry into unknown_tagged_fields.
Trait Implementations§
source§impl Clone for ProduceRequest
impl Clone for ProduceRequest
source§fn clone(&self) -> ProduceRequest
fn clone(&self) -> ProduceRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ProduceRequest
impl Debug for ProduceRequest
source§impl Decodable for ProduceRequest
impl Decodable for ProduceRequest
source§impl Default for ProduceRequest
impl Default for ProduceRequest
source§impl Encodable for ProduceRequest
impl Encodable for ProduceRequest
source§impl From<ProduceRequest> for RequestKind
impl From<ProduceRequest> for RequestKind
source§fn from(value: ProduceRequest) -> RequestKind
fn from(value: ProduceRequest) -> RequestKind
source§impl HeaderVersion for ProduceRequest
impl HeaderVersion for ProduceRequest
source§fn header_version(version: i16) -> i16
fn header_version(version: i16) -> i16
source§impl Message for ProduceRequest
impl Message for ProduceRequest
source§const VERSIONS: VersionRange = _
const VERSIONS: VersionRange = _
source§const DEPRECATED_VERSIONS: Option<VersionRange> = _
const DEPRECATED_VERSIONS: Option<VersionRange> = _
source§impl PartialEq for ProduceRequest
impl PartialEq for ProduceRequest
source§impl Request for ProduceRequest
impl Request for ProduceRequest
impl StructuralPartialEq for ProduceRequest
Auto Trait Implementations§
impl !Freeze for ProduceRequest
impl RefUnwindSafe for ProduceRequest
impl Send for ProduceRequest
impl Sync for ProduceRequest
impl Unpin for ProduceRequest
impl UnwindSafe for ProduceRequest
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)