blew 0.1.0

Cross-platform async BLE library for Rust (Apple, Linux, Android)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![cfg(feature = "testing")]

use blew::{Central, CentralConfig};

#[tokio::test]
#[ignore = "requires a real BLE adapter with TCC authorization"]
async fn with_config_accepts_restore_identifier() {
    let config = CentralConfig {
        restore_identifier: Some("com.example.test".into()),
    };
    let _central = Central::with_config(config).await.unwrap();
}

#[test]
fn central_config_default_has_no_restore_identifier() {
    let c = CentralConfig::default();
    assert!(c.restore_identifier.is_none());
}