bluetooth_serial_port/
lib.rs

1//! Interact with Bluetooth devices via RFCOMM channels.
2#![deny(
3    missing_docs,
4    missing_debug_implementations,
5    missing_copy_implementations,
6    trivial_numeric_casts,
7    unstable_features,
8    unused_import_braces,
9    unused_qualifications
10)]
11
12mod bluetooth;
13pub use crate::bluetooth::*;
14
15// ////////////////////////////////////
16// Linux implementation of functions
17#[cfg(target_os = "linux")]
18mod linux;
19
20#[cfg(target_os = "windows")]
21#[allow(unused_variables)] // TODO: remove warnings
22mod windows;
23
24mod platform {
25
26    #[cfg(target_os = "linux")]
27    pub use crate::linux::*;
28
29    #[cfg(target_os = "windows")]
30    pub use crate::windows::*;
31}
32
33/// OS-specific functionality
34pub mod os {
35    /// Linux-specific definitions
36    #[cfg(target_os = "linux")]
37    pub mod linux {
38        pub use crate::linux::{BtSocket, BtSocketConnect};
39    }
40}