[][src]Struct pulsar::producer::MultiTopicProducer

pub struct MultiTopicProducer<Exe: Executor> { /* fields omitted */ }

Wrapper structure that manges multiple producers at once, creating them as needed

use pulsar::{Pulsar, TokioExecutor};

let pulsar: Pulsar<_> = Pulsar::builder(addr, TokioExecutor).build().await?;
let mut producer = pulsar.producer()
    .with_name("name")
    .build_multi_topic();
let send_1 = producer.send(topic, &message).await?;
let send_2 = producer.send(topic, &message).await?;
send_1.await?;
send_2.await?;

Implementations

impl<Exe: Executor> MultiTopicProducer<Exe>[src]

pub fn options(&self) -> &ProducerOptions[src]

pub fn topics(&self) -> Vec<String>[src]

pub async fn close_producer<S: Into<String>, '_>(
    &'_ mut self,
    topic: S
) -> Result<(), Error>
[src]

pub async fn send<T: SerializeMessage + Sized, S: Into<String>, '_>(
    &'_ mut self,
    topic: S,
    message: T
) -> Result<SendFuture, Error>
[src]

pub async fn send_all<'a, 'b, T, S, I, '_>(
    &'_ mut self,
    topic: S,
    messages: I
) -> Result<Vec<SendFuture>, Error> where
    'b: 'a,
    T: 'b + SerializeMessage + Sized,
    I: IntoIterator<Item = T>,
    S: Into<String>, 
[src]

Auto Trait Implementations

impl<Exe> !RefUnwindSafe for MultiTopicProducer<Exe>

impl<Exe> Send for MultiTopicProducer<Exe>

impl<Exe> Sync for MultiTopicProducer<Exe>

impl<Exe> Unpin for MultiTopicProducer<Exe>

impl<Exe> !UnwindSafe for MultiTopicProducer<Exe>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,