Skip to main content

MockProducerOptions

Struct MockProducerOptions 

Source
#[non_exhaustive]
pub struct MockProducerOptions<K, V> { /* private fields */ }
Expand description

Parameters for MockProducer::with_options.

This struct has no Java counterpart (DoD #7). It exists solely to satisfy CLAUDE.md §2’s cap on derived overload names: Java’s widest MockProducer(Cluster, boolean, Partitioner, Serializer, Serializer) constructor (MockProducer.java:113) differs from the group’s parameter-name intersection — which is EMPTY, since the no-arg :149 is in the group — by five parameters, so the cap fires and this struct becomes the method’s only parameter, carrying every Java parameter.

It deliberately has no Default. auto_complete is what both parameter-taking Java constructors (:113, :137) take from their caller, so it has no Java-derived default; the no-arg :149, which does default it to false, is translated as Default for MockProducer instead. Construct it with MockProducerOptionsBuilder::new and set it: MockProducerOptionsBuilder::build returns an error if auto_complete was not set.

Auto Trait Implementations§

§

impl<K, V> Freeze for MockProducerOptions<K, V>

§

impl<K, V> !RefUnwindSafe for MockProducerOptions<K, V>

§

impl<K, V> Send for MockProducerOptions<K, V>

§

impl<K, V> Sync for MockProducerOptions<K, V>

§

impl<K, V> Unpin for MockProducerOptions<K, V>

§

impl<K, V> UnsafeUnpin for MockProducerOptions<K, V>

§

impl<K, V> !UnwindSafe for MockProducerOptions<K, V>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V