pub trait Connectivity: Debug {
// Required methods
fn connect(
&mut self,
ssid: &str,
password: &str,
) -> Result<bool, WifiConnectionError>;
fn disconnect(&self) -> Result<bool, WifiConnectionError>;
}
Expand description
Wireless network connectivity functionality.
Required Methods§
Sourcefn connect(
&mut self,
ssid: &str,
password: &str,
) -> Result<bool, WifiConnectionError>
fn connect( &mut self, ssid: &str, password: &str, ) -> Result<bool, WifiConnectionError>
Makes an attempt to connect to a selected wireless network with password specified.
Sourcefn disconnect(&self) -> Result<bool, WifiConnectionError>
fn disconnect(&self) -> Result<bool, WifiConnectionError>
Disconnects from a wireless network currently connected to.
Implementors§
impl Connectivity for WiFi
Wireless network connectivity functionality.