pub struct KafkaClientBuilder { /* private fields */ }
Expand description
Helper structure responsible for building the actual KafkaClient
.
Implementations§
source§impl KafkaClientBuilder
impl KafkaClientBuilder
sourcepub fn add_kafka_topic_config(
self,
topic: KafkaTopic,
params: &KafkaParams<'_>,
validate_topic: bool,
) -> Result<Self, ClientError>
pub fn add_kafka_topic_config( self, topic: KafkaTopic, params: &KafkaParams<'_>, validate_topic: bool, ) -> Result<Self, ClientError>
Adds topic configuration to the current KafkaClientBuilder
, which in return assigns
dedicates producer to the topic which can will be used to send the messages.
§Errors
Returns ClientError::InvalidConfig
error if the provided configuration is wrong and
the producer could not be created.
sourcepub fn build(self) -> KafkaClient
pub fn build(self) -> KafkaClient
Consumes self and returns the built KafkaClient
.
Trait Implementations§
source§impl Debug for KafkaClientBuilder
impl Debug for KafkaClientBuilder
source§impl Default for KafkaClientBuilder
impl Default for KafkaClientBuilder
source§fn default() -> KafkaClientBuilder
fn default() -> KafkaClientBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for KafkaClientBuilder
impl !RefUnwindSafe for KafkaClientBuilder
impl Send for KafkaClientBuilder
impl Sync for KafkaClientBuilder
impl Unpin for KafkaClientBuilder
impl !UnwindSafe for KafkaClientBuilder
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