#[cfg(target_os = "linux")]
mod linux;
#[cfg(target_os = "macos")]
mod osx;
#[cfg(any(test, target_os = "macos"))]
mod osx_parse;
#[cfg(target_os = "windows")]
mod windows;
#[cfg(any(test, target_os = "windows"))]
mod windows_parse;
use std::{fmt, io};
use thiserror::Error;
#[derive(Debug)]
pub struct WiFi {
#[allow(dead_code)]
pub interface: String,
}
#[derive(Debug, Error)]
pub enum WifiError {
#[error("Wifi is currently disabled")]
WifiDisabled,
#[cfg(target_os = "windows")]
#[error("Wifi interface failed to switch on")]
InterfaceFailedToOn,
#[allow(missing_docs)]
#[error("Wifi IO Error")]
IoError(#[from] io::Error),
}
pub trait WifiInterface: fmt::Debug {
fn is_wifi_enabled(&self) -> Result<bool, WifiError> {
unimplemented!();
}
fn visible_ssid(&self) -> Result<Vec<String>, WifiError> {
unimplemented!();
}
}