publishing/publishing.rs
1use kdb::{list, symbol, Connection};
2
3/// Note you'll need a kdb instance on localhost:4200 with the function "upd" defined for this to work...
4fn main() {
5 let conn = Connection::connect("127.0.0.1", 4200, "", None).unwrap();
6 let l = list![i32; 1, 2, 3];
7 if let Err(err) = conn.publish("upd", symbol("some_topic"), l) {
8 println!("Publishing failed: {}", err);
9 }
10 println!("Publish succeeded! Probably.");
11}