Trait OptionExt

Source
pub trait OptionExt {
    type AdminClient: FromClientConfig;

    // Required methods
    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;

    // Provided methods
    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 { ... }
}

Required Associated Types§

Required Methods§

Source

fn get_brokers(&self) -> &str

Source

fn get_log_level(&self) -> RDKafkaLogLevel

Source

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,

Provided Methods§

Source

fn get_new_topics(&self) -> KWResult<Vec<NewTopic<'_>>>

Source

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,

Source

fn create_admin_client(&self) -> KWResult<Self::AdminClient>

Source

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,

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§