Struct canal::broadcast::Broadcast [] [src]

pub struct Broadcast<T> {
    // some fields omitted
}

Struct that sends message on a broadcast pattern.

Methods

impl<T> Broadcast<T>

fn new() -> Broadcast<T>

Create a new Broadcast struct.

fn consume(&self) -> Consumer<T>

Create a Consumer that listens to messages from the Broadcaster.

impl<T: Clone> Broadcast<T>

fn send(&self, data: T) -> Result<(), BroadcastError<T>>

Send a message on the broadcast.