pub struct KafkaClient { /* private fields */ }Expand description
A small builder facade around one or more bootstrap servers.
Implementations§
Source§impl KafkaClient
impl KafkaClient
Sourcepub fn new(bootstrap_server: impl Into<String>) -> Self
pub fn new(bootstrap_server: impl Into<String>) -> Self
Creates a client facade from one bootstrap server.
Sourcepub fn with_bootstrap_servers(
self,
servers: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn with_bootstrap_servers( self, servers: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Sets bootstrap servers and returns the updated value.
Sourcepub fn topic(&self, topic: impl Into<String>) -> KafkaTopic
pub fn topic(&self, topic: impl Into<String>) -> KafkaTopic
Returns a topic-scoped builder facade.
Trait Implementations§
Source§impl Clone for KafkaClient
impl Clone for KafkaClient
Source§fn clone(&self) -> KafkaClient
fn clone(&self) -> KafkaClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for KafkaClient
impl RefUnwindSafe for KafkaClient
impl Send for KafkaClient
impl Sync for KafkaClient
impl Unpin for KafkaClient
impl UnsafeUnpin for KafkaClient
impl UnwindSafe for KafkaClient
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