[−][src]Trait datastreamcorelib::pubsub::PubSubManager
Generic traits any PUB/SUB manager should implement
Required methods
fn subscribe(&mut self, sub: &Subscription) -> Fallible<()>
Add subscription to the manager
fn get_subscriptions(&self) -> &Vec<Subscription>
Return the list of subscriptons
fn get_default_pub_socket(&self) -> &Option<ZMQSocketArc>
Get the default publish socket (if available)
Provided methods
fn dispatch(&self, psmsg: PubSubMessage)
Dispatch message to matching subscribers
fn publish_to_socket<T: PubSubMessageMarker + Debug>(
&self,
msg: &T,
socket: &ZMQSocketArc
) -> Fallible<()>
&self,
msg: &T,
socket: &ZMQSocketArc
) -> Fallible<()>
Publish a message (anything with pubsub marker) to given socket Usually you would just use .publish() instead
fn publish<T: PubSubMessageMarker + Debug>(&self, msg: &T) -> Fallible<()>
Publish a message (anything with pubsub marker) to default socket