#[non_exhaustive]pub struct ProducerRecordOptions<K, V> { /* private fields */ }Expand description
The parameters of Java’s widest ProducerRecord constructor
(ProducerRecord(String, Integer, Long, K, V, Iterable<Header>),
ProducerRecord.java:69).
This struct has no Java counterpart (DoD #7). It exists solely to
satisfy CLAUDE.md §2’s cap on derived overload names: that constructor
differs from the group’s intersection {topic, value} by four parameters
— partition, timestamp, key, headers — so the cap fires and this
struct becomes the method’s only parameter, carrying every Java
parameter including the intersection’s own.
It deliberately has no Default. topic and value are what even
Java’s narrowest constructor (:142) takes from its caller, so neither has
a Java-derived default — and a synthesised empty topic would silently send
the record nowhere. Construct it with ProducerRecordOptionsBuilder::new
and set them: ProducerRecordOptionsBuilder::build returns an error if any of topic, value was not set.
Trait Implementations§
Source§impl<K: Clone, V: Clone> Clone for ProducerRecordOptions<K, V>
impl<K: Clone, V: Clone> Clone for ProducerRecordOptions<K, V>
Source§fn clone(&self) -> ProducerRecordOptions<K, V>
fn clone(&self) -> ProducerRecordOptions<K, V>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more