Struct pubsub::PubSub [] [src]

pub struct PubSub {
    // some fields omitted


impl PubSub

fn new(num_threads: usize) -> PubSub

fn subscribe<F>(&self, channel: &str, func: F) -> Subscription where F: FnMut(String) + 'static + Send

fn lazy_subscribe(&self, channel: &str) -> SubActivator

fn num_channels(&self) -> usize

fn notify(&self, channel: &str, msg: &str, exception: Option<u64>)

Trait Implementations

impl Clone for PubSub

fn clone(&self) -> PubSub

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

impl Send for PubSub

impl Sync for PubSub