2 releases
0.5.3 | Feb 13, 2022 |
---|---|
0.5.2 | Jan 22, 2022 |
0.5.1 |
|
0.5.0 |
|
#1986 in Development tools
9KB
155 lines
Simple Pubsub
Usage:
let topic = "lobby";
let broadcaster: Arc<Broadcaster<String>> = Arc::new(Broadcaster::default());
let (id, mut receiver) = broadcaster.clone().subscribe(topic);
broadcaster.publish(topic, Arc::new("hello world".into()));
let data = receiver.recv().await.unwrap();
assert!(id > 0);
assert_eq!(data.as_ref(), "hello world");
Dependencies
~3.5–9MB
~73K SLoC