nmrs 2.3.0

A Rust library for NetworkManager over D-Bus
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/// List Bluetooth devices using NetworkManager
use nmrs::{NetworkManager, Result};

#[tokio::main]
async fn main() -> Result<()> {
    let nm = NetworkManager::new().await?;

    println!("Scanning for Bluetooth devices...");
    let devices = nm.list_bluetooth_devices().await?;

    // List bluetooth devices
    for d in devices {
        println!("{d}");
    }

    Ok(())
}