wifi_ctrl/
lib.rs

1//! Tokio-based runtimes for communicating with hostapd and wpa-supplicant.
2//!
3//! # Quick Start
4//!
5//! Checkout the examples [on Github](https://github.com/novalabsxyz/wifi-ctrl) for a quick start.
6//!
7
8#![doc(
9    html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
10    html_favicon_url = "https://www.rust-lang.org/favicon.ico",
11    html_root_url = "https://docs.rs/wpactrl/"
12)]
13#![doc(test(attr(allow(unused_variables), deny(warnings))))]
14
15use std::str::FromStr;
16use std::sync::Arc;
17use tokio::sync::{broadcast, mpsc, oneshot};
18
19/// WiFi Access Point runtime and types
20pub mod ap;
21/// Crate-wide error types
22pub mod error;
23/// WiFi Station (network client) runtime and types
24pub mod sta;
25
26pub(crate) mod socket_handle;
27
28use socket_handle::SocketHandle;
29pub type Result<T = ()> = std::result::Result<T, error::Error>;
30
31use log::{debug, error, info, warn};
32
33pub(crate) trait ShutdownSignal {
34    fn is_shutdown(&self) -> bool;
35    fn inform_of_shutdown(self);
36}