tauri_plugin_bluetooth_manager/
models.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Deserialize, Serialize)]
4#[serde(rename_all = "camelCase")]
5pub struct PingRequest {
6 pub value: Option<String>,
7}
8
9#[derive(Debug, Clone, Default, Deserialize, Serialize)]
10#[serde(rename_all = "camelCase")]
11pub struct PingResponse {
12 pub value: Option<String>,
13}
14
15#[derive(Serialize, Debug, Clone)]
16pub struct AdapterInfo {
17 pub path: String,
18 pub address: String, pub name: String,
20 pub alias: String,
21 pub class: u32, pub powered: bool,
23 pub discoverable: bool,
24 pub discoverable_timeout: u32,
25 pub pairable: bool,
26 pub pairable_timeout: u32,
27 pub discovering: bool,
28 pub uuids: Vec<String>,
29 pub modalias: Option<String>, }
31
32#[derive(Serialize, Debug, Clone)]
33pub struct DeviceInfo {
34 pub path: String,
35 pub address: String, pub name: Option<String>,
37 pub alias: Option<String>,
38 pub class: Option<u32>,
39 pub appearance: Option<u16>,
40 pub icon: Option<String>,
41 pub paired: bool,
42 pub trusted: bool,
43 pub blocked: bool,
44 pub legacy_pairing: bool,
45 pub rssi: Option<i16>,
46 pub tx_power: Option<i16>, pub connected: bool,
48 pub uuids: Vec<String>,
49 pub adapter: String, pub services_resolved: bool,
51 }
54
55#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
56pub struct BluetoothChange {
57 pub change_type: String,
58 pub data: serde_json::Value,
59}