Struct rdkafka_wrap::KWProducer
source · pub struct KWProducer {
pub conf: KWProducerConf,
pub producer: HpProducer<DefaultProducerContext>,
pub admin_client: Mutex<Option<AdminClient<DefaultClientContext>>>,
}
Fields§
§conf: KWProducerConf
§producer: HpProducer<DefaultProducerContext>
§admin_client: Mutex<Option<AdminClient<DefaultClientContext>>>
Implementations§
source§impl KWProducer
impl KWProducer
pub fn new(conf: KWProducerConf) -> KWResult<KWProducer>
pub async fn send<'a, K, P>( &'a self, record: BaseRecord<'a, K, P> ) -> Result<(), (KWError, Option<BaseRecord<'a, K, P>>)>where K: ToBytes + ?Sized, P: ToBytes + ?Sized,
Trait Implementations§
source§impl OptionExt for KWProducer
impl OptionExt for KWProducer
type AdminClient = AdminClient<DefaultClientContext>
fn create_topic<'a, 'life0, 'async_trait, I>( &'life0 self, topics: I ) -> Pin<Box<dyn Future<Output = KWResult<()>> + Send + 'async_trait>>where I: IntoIterator<Item = &'a NewTopic<'a>> + Send + 'async_trait, Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,
fn get_brokers(&self) -> &str
fn get_log_level(&self) -> RDKafkaLogLevel
fn create_admin_client(&self) -> KWResult<Self::AdminClient>
Auto Trait Implementations§
impl !RefUnwindSafe for KWProducer
impl Send for KWProducer
impl Sync for KWProducer
impl Unpin for KWProducer
impl !UnwindSafe for KWProducer
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