Trait simple_pubsub::Topic
source · [−]pub trait Topic<T>: Clone + Send + Sync + 'static {
fn subscribe(self, name: impl Into<String>) -> (u32, Receiver<Arc<T>>);
fn unsubscribe(self, name: impl AsRef<str>, id: u32) -> Option<u32>;
fn publish(self, name: impl Into<String>, value: Arc<T>);
}Required methods
subscribe to a topic (here name should be session id)