Chore(Stage): Initial Commit

This commit is contained in:
Tochukwu Nkemdilim
2018-06-13 18:41:24 +01:00
commit 1535d3d768
12 changed files with 305 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
pub mod profile_network;
mod handlers;
mod stubs;
mod providers;
use std::{fmt, io};
use std::string::FromUtf8Error;
pub trait Network {
/// Makes an attempt to connect to a selected wireless network with password specified.
fn connect(&self, password: &str) -> bool;
}
// Improve upon this.
impl fmt::Debug for Network {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "Network")
}
}
pub enum NetworkType {
WEP,
WPA,
WPA2,
}
pub enum NetworkTypeParseError {
FromUtf8Error(FromUtf8Error),
IoError(io::Error),
}