Struct eventador::AsyncPublisher[][src]

pub struct AsyncPublisher<T> { /* fields omitted */ }

A handle to asynchronously publish to the event-bus.

Implements the [Sink] trait to asynchronously publish a stream of events to the event-bus.

Example

Basic usage:

let eventbus = Eventador::new(4)?;
let mut publisher: AsyncPublisher<usize> = eventbus.async_publisher(10);

let mut i: usize = 1234;
publisher.send(i).await?;

Trait Implementations

impl<T: 'static + Send + Sync + Unpin> Sink<T> for AsyncPublisher<T>[src]

type Error = PublishError

The type of value produced by the sink when an error occurs.

Auto Trait Implementations

impl<T> !RefUnwindSafe for AsyncPublisher<T>[src]

impl<T> Send for AsyncPublisher<T> where
    T: Send
[src]

impl<T> Sync for AsyncPublisher<T> where
    T: Sync
[src]

impl<T> Unpin for AsyncPublisher<T> where
    T: Unpin
[src]

impl<T> !UnwindSafe for AsyncPublisher<T>[src]

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

type Init = T

The type for initializers.

impl<T, Item> SinkExt<Item> for T where
    T: Sink<Item> + ?Sized

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.