pub trait FromClientConfigAndContext<C>: Sizedwhere
C: ClientContext,{
// Required method
fn from_config_and_context(
_: &ClientConfig,
_: C
) -> Result<Self, KafkaError>;
}
Expand description
Create a new client based on the provided configuration and context.
Required Methods§
sourcefn from_config_and_context(_: &ClientConfig, _: C) -> Result<Self, KafkaError>
fn from_config_and_context(_: &ClientConfig, _: C) -> Result<Self, KafkaError>
Creates a client from a client configuration and a client context.
Implementors§
impl<C> FromClientConfigAndContext<C> for AdminClient<C>where C: ClientContext,
impl<C> FromClientConfigAndContext<C> for BaseConsumer<C>where C: ConsumerContext,
Creates a new BaseConsumer
starting from a ClientConfig
.
impl<C, Part> FromClientConfigAndContext<C> for HpProducer<C, Part>where Part: Partitioner + Send + Sync + 'static, C: ProducerContext<Part> + 'static,
impl<C, Part> FromClientConfigAndContext<C> for BaseProducer<C, Part>where Part: Partitioner, C: ProducerContext<Part>,
impl<C, Part> FromClientConfigAndContext<C> for ThreadedProducer<C, Part>where Part: Partitioner + Send + Sync + 'static, C: ProducerContext<Part> + 'static,
impl<C, R> FromClientConfigAndContext<C> for StreamConsumer<C, R>where C: ConsumerContext + 'static, R: AsyncRuntime,
Creates a new StreamConsumer
starting from a ClientConfig
.