Trait rdkafka::config::FromClientConfigAndContext
source · pub trait FromClientConfigAndContext<C: ClientContext>: Sized {
// Required method
fn from_config_and_context(_: &ClientConfig, _: C) -> KafkaResult<Self>;
}
Expand description
Create a new client based on the provided configuration and context.
Required Methods§
sourcefn from_config_and_context(_: &ClientConfig, _: C) -> KafkaResult<Self>
fn from_config_and_context(_: &ClientConfig, _: C) -> KafkaResult<Self>
Creates a client from a client configuration and a client context.
Object Safety§
This trait is not object safe.
Implementors§
impl<C> FromClientConfigAndContext<C> for BaseProducer<C>where
C: ProducerContext,
impl<C> FromClientConfigAndContext<C> for ThreadedProducer<C>where
C: ProducerContext + 'static,
impl<C, R> FromClientConfigAndContext<C> for StreamConsumer<C, R>where
C: ConsumerContext + 'static,
R: AsyncRuntime,
Creates a new StreamConsumer
starting from a ClientConfig
.
impl<C, R> FromClientConfigAndContext<C> for FutureProducer<C, R>where
C: ClientContext + 'static,
R: AsyncRuntime,
impl<C: ClientContext> FromClientConfigAndContext<C> for AdminClient<C>
impl<C: ConsumerContext> FromClientConfigAndContext<C> for BaseConsumer<C>
Creates a new BaseConsumer
starting from a ClientConfig
.