Struct eventador::Publisher[][src]

pub struct Publisher { /* fields omitted */ }

A handle to publish events to the event-bus.

Although the Eventador::publish function has the exact same behavior, this handle offers an API that mirrors the AsyncPublisher API.

Example

Basic usage:

let eventbus = Eventador::new(4)?;
let mut publisher = eventbus.publisher();

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

Implementations

impl Publisher[src]

pub fn send<T: 'static + Send + Sync>(&mut self, event: T)[src]

Publish an event on the event-bus.

Example

Basic usage:

let eventbus = Eventador::new(4)?;

let i: usize = 1234;
eventbus.publish(i);

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> 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, 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.