pub struct VSKNetworkManager<'a, R: Runtime> {
pub connection: Connection,
pub proxy: PropertiesProxy<'a>,
pub app: AppHandle<R>,
}
Fields§
§connection: Connection
§proxy: PropertiesProxy<'a>
§app: AppHandle<R>
Implementations§
Source§impl<R: Runtime> VSKNetworkManager<'static, R>
impl<R: Runtime> VSKNetworkManager<'static, R>
pub fn get_current_network_state(&self) -> Result<NetworkInfo>
Sourcepub fn list_wifi_networks(&self) -> Result<Vec<NetworkInfo>>
pub fn list_wifi_networks(&self) -> Result<Vec<NetworkInfo>>
List available WiFi networks
Sourcepub async fn connect_to_wifi(&self, config: WiFiConnectionConfig) -> Result<()>
pub async fn connect_to_wifi(&self, config: WiFiConnectionConfig) -> Result<()>
Connect to a WiFi network
Sourcepub fn toggle_network_state(&self, enabled: bool) -> Result<bool>
pub fn toggle_network_state(&self, enabled: bool) -> Result<bool>
Toggle network state
Sourcepub fn listen_network_changes(&self) -> Result<Receiver<NetworkInfo>>
pub fn listen_network_changes(&self) -> Result<Receiver<NetworkInfo>>
Listen for network changes
Sourcepub async fn disconnect_from_wifi(&self) -> Result<()>
pub async fn disconnect_from_wifi(&self) -> Result<()>
Disconnect from the current WiFi network
Sourcepub fn get_saved_wifi_networks(&self) -> Result<Vec<NetworkInfo>>
pub fn get_saved_wifi_networks(&self) -> Result<Vec<NetworkInfo>>
Get the list of saved WiFi networks
Sourcepub fn delete_wifi_connection(&self, ssid: &str) -> Result<bool>
pub fn delete_wifi_connection(&self, ssid: &str) -> Result<bool>
Delete a saved WiFi connection by SSID
Trait Implementations§
Source§impl<'a, R: Clone + Runtime> Clone for VSKNetworkManager<'a, R>
impl<'a, R: Clone + Runtime> Clone for VSKNetworkManager<'a, R>
Source§fn clone(&self) -> VSKNetworkManager<'a, R>
fn clone(&self) -> VSKNetworkManager<'a, R>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a, R> Freeze for VSKNetworkManager<'a, R>
impl<'a, R> !RefUnwindSafe for VSKNetworkManager<'a, R>
impl<'a, R> Send for VSKNetworkManager<'a, R>
impl<'a, R> Sync for VSKNetworkManager<'a, R>
impl<'a, R> Unpin for VSKNetworkManager<'a, R>
impl<'a, R> !UnwindSafe for VSKNetworkManager<'a, R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more