Struct WiFi

Source
pub struct WiFi { /* private fields */ }
Expand description

Wireless network interface for linux operating system.

Implementations§

Source§

impl Linux

Source

pub fn new(config: Option<Config<'_>>) -> Self

Trait Implementations§

Source§

impl Connectivity for WiFi

Wireless network connectivity functionality.

Source§

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>

Attempts to disconnect from a wireless network currently connected to.

Source§

impl Debug for Linux

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

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>

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>

Start serving publicly an already created wireless hotspot.

Source§

fn stop_hotspot(&mut self) -> Result<bool, WifiHotspotError>

Stop serving a wireless network.

NOTE: All users connected will automatically be disconnected.

Auto Trait Implementations§

§

impl Freeze for Linux

§

impl RefUnwindSafe for Linux

§

impl Send for Linux

§

impl Sync for Linux

§

impl Unpin for Linux

§

impl UnwindSafe for Linux

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.