Feat(OSX): Add OSX Support

This commit is contained in:
Tochukwu Nkemdilim
2018-07-10 13:53:38 +01:00
parent 23355114c4
commit cb161ba6c2
+7
View File
@@ -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)