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)

unsubscribe to a topic

public a message to a topic

Implementations on Foreign Types

Implementors