nt 3.0.0

A NetworkTables revision 3 library for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use nt::{ConnectionCallbackType, NetworkTables};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let client = NetworkTables::connect("127.0.0.1:1735", "cool client").await?;

    client.add_connection_callback(ConnectionCallbackType::ClientDisconnected, |_| {
        println!("Client has disconnected from the server");
    });

    println!("Listing entries");
    for (id, data) in client.entries() {
        println!("{} => {:?}", id, data);
    }

    loop {}
    Ok(())
}