pub trait FromClientConfigAndContext<C: ClientContext>: Sized {
// Required method
fn from_config_and_context<'life0, 'async_trait>(
_: &'life0 ClientConfig,
__arg1: C,
) -> Pin<Box<dyn Future<Output = KafkaResult<Self>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Create a new client based on the provided configuration and context.
Required Methods§
Sourcefn from_config_and_context<'life0, 'async_trait>(
_: &'life0 ClientConfig,
__arg1: C,
) -> Pin<Box<dyn Future<Output = KafkaResult<Self>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn from_config_and_context<'life0, 'async_trait>(
_: &'life0 ClientConfig,
__arg1: C,
) -> Pin<Box<dyn Future<Output = KafkaResult<Self>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Creates a client from a client configuration and a client context.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl<C, Part> FromClientConfigAndContext<C> for BaseProducer<C, Part>where
Part: Partitioner,
C: ProducerContext<Part>,
impl<C, Part> FromClientConfigAndContext<C> for ThreadedProducer<C, Part>
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: ConsumerContext> FromClientConfigAndContext<C> for BaseConsumer<C>
Creates a new BaseConsumer
starting from a ClientConfig
.