pub struct WiFi { /* private fields */ }
Expand description
Wireless network interface for linux operating system.
Implementations§
Trait Implementations§
source§impl Connectivity for WiFi
impl Connectivity for WiFi
Wireless network connectivity functionality.
source§fn connect(
&mut self,
ssid: &str,
password: &str
) -> Result<bool, WifiConnectionError>
fn connect(
&mut self,
ssid: &str,
password: &str
) -> Result<bool, WifiConnectionError>
Attempts to connect to a wireless network with a given SSID and password.
source§fn disconnect(&self) -> Result<bool, WifiConnectionError>
fn disconnect(&self) -> Result<bool, WifiConnectionError>
Attempts to disconnect from a wireless network currently connected to.
source§impl WifiHotspot for WiFi
impl WifiHotspot for WiFi
Wireless hotspot functionality for a wifi interface.
source§fn create_hotspot(
&mut self,
ssid: &str,
password: &str,
configuration: Option<&HotspotConfig>
) -> Result<bool, WifiHotspotError>
fn create_hotspot(
&mut self,
ssid: &str,
password: &str,
configuration: Option<&HotspotConfig>
) -> Result<bool, WifiHotspotError>
Creates wireless hotspot service for host machine. This only creats the wifi network,
and isn’t responsible for initiating the serving of the wifi network process.
To begin serving the hotspot, use start_hotspot()
.
source§fn start_hotspot() -> Result<bool, WifiHotspotError>
fn start_hotspot() -> Result<bool, WifiHotspotError>
Start serving publicly an already created wireless hotspot.
source§fn stop_hotspot(&mut self) -> Result<bool, WifiHotspotError>
fn stop_hotspot(&mut self) -> Result<bool, WifiHotspotError>
Stop serving a wireless network.
NOTE: All users connected will automatically be disconnected.