[][src]Struct fluvio::TopicProducer

pub struct TopicProducer { /* fields omitted */ }

An interface for producing events to a particular topic

A TopicProducer allows you to send events to the specific topic it was initialized for. Once you have a TopicProducer, you can send events to the topic, choosing which partition each event should be delivered to.

Implementations

impl TopicProducer[src]

pub async fn send_record<B: AsRef<[u8]>, '_>(
    &'_ self,
    buffer: B,
    partition: i32
) -> Result<(), FluvioError>
[src]

Sends an event to a specific partition within this producer's topic

Example

let partition = 0;
producer.send_record("Hello, Fluvio!", partition).await?;

Auto Trait Implementations

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> Erased for T

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

impl<T> Instrument for T[src]

impl<T> Instrument 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<T> WithSubscriber for T[src]