pub struct KWClient {
pub admin_client: Arc<AdminClient<DefaultClientContext>>,
pub kw_producer: KWProducer,
pub kw_consumer: BTreeMap<GroupID, KWConsumer>,
pub brokers: String,
pub create_topic_conf: HashMap<TopicName, NewTopic<'static>>,
pub default_topic_conf: Option<NewTopic<'static>>,
/* private fields */
}
Fields§
§admin_client: Arc<AdminClient<DefaultClientContext>>
§kw_producer: KWProducer
§kw_consumer: BTreeMap<GroupID, KWConsumer>
§brokers: String
§create_topic_conf: HashMap<TopicName, NewTopic<'static>>
§default_topic_conf: Option<NewTopic<'static>>
Implementations§
Source§impl KWClient
impl KWClient
pub fn new<B>( brokers: B, kw_producer: KWProducer, kw_consumer: KWConsumer, log_level: Option<RDKafkaLogLevel>, ) -> KWResult<Self>
pub fn set_consumer(self, kw_consumer: KWConsumer) -> Self
pub fn set_log_level(self, log_level: RDKafkaLogLevel) -> Self
pub fn get_log_level(&self) -> RDKafkaLogLevel
Trait Implementations§
Source§impl OptionExt for KWClient
impl OptionExt for KWClient
type AdminClient = AdminClient<DefaultClientContext>
fn get_brokers(&self) -> &str
fn get_log_level(&self) -> RDKafkaLogLevel
fn get_admin_client<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = KWResult<Arc<AdminClient<DefaultClientContext>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_new_topics(&self) -> KWResult<Vec<NewTopic<'_>>>
fn create_topic<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = KWResult<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn create_admin_client(&self) -> KWResult<Self::AdminClient>
fn get_topics<'life0, 'async_trait, C>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = KWResult<Vec<MetadataTopicWrap>>> + Send + 'async_trait>>where
C: 'async_trait + ClientContext,
Self: Sync + 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !Freeze for KWClient
impl !RefUnwindSafe for KWClient
impl Send for KWClient
impl Sync for KWClient
impl Unpin for KWClient
impl !UnwindSafe for KWClient
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