Feat(OSX): Add OSX Support
This commit is contained in:
@@ -15,6 +15,9 @@ pub trait Network: fmt::Debug {
|
||||
fn is_wifi_enabled(&self) -> bool;
|
||||
fn connnection_up(&self) -> bool;
|
||||
fn connnection_down(&self) -> bool;
|
||||
|
||||
// Hotspot
|
||||
// fn create_hotspot(&self, ssid: &str, password: &str) -> Result<bool, WifiHotspotError>;
|
||||
}
|
||||
|
||||
// #[derive(Debug)]
|
||||
@@ -41,6 +44,10 @@ pub enum WifiConnectionError {
|
||||
WiFiInterfaceDisabled,
|
||||
}
|
||||
|
||||
pub enum WifiHotspotError {
|
||||
CreationFailed,
|
||||
}
|
||||
|
||||
impl From<io::Error> for WifiConnectionError {
|
||||
fn from(error: io::Error) -> Self {
|
||||
WifiConnectionError::IoError(error)
|
||||
|
||||
Reference in New Issue
Block a user