pub(crate) async fn find_connection_by_ssid(
        &self,
        ssid: &SSID,
    ) -> Result<Option<(dbus::Path<'_>, WiFiConnectionSettings)>, CaptivePortalError> {
        let connections = {
            use super::generated::connections::Settings;
            let p = nonblock::Proxy::new(NM_BUSNAME, NM_SETTINGS_PATH, self.conn.clone());
            p.connections().await?
        };
        for connection_path in connections {
            let settings = wifi_settings::get_connection_settings(self.conn.clone(), connection_path.clone()).await?;
            if let Some(settings) = settings {
                // A matching connection could be found. Replace the settings with new ones and store to disk
                if &settings.ssid == ssid {
                    return Ok(Some((connection_path, settings)));
                }
            }
        }
        return Ok(None);
    }
/// Returns the dbus network manager api connection path and the connection_id as tuple.
Returns the dbus network manager api connection path and the connection_id as tuple.
Returns the dbus network manager api connection path and the connection_id as tuple .
pub(crate) async fn find_connection_by_ssid(
        &self,
        ssid: &SSID,
    ) -> Result<Option<(dbus::Path<'_>, WiFiConnectionSettings)>, CaptivePortalError> {
        let connections = {
            use super::generated::connections::Settings;
            let p = nonblock::Proxy::new(NM_BUSNAME, NM_SETTINGS_PATH, self.conn.clone());
            p.connections().await?
        };
        for connection_path in connections {
            let settings = wifi_settings::get_connection_settings(self.conn.clone(), connection_path.clone()).await?;
            if let Some(settings) = settings {
                // A matching connection could be found. Replace the settings with new ones and store to disk
                if &settings.ssid == ssid {
                    return Ok(Some((connection_path, settings)));
                }
            }
        }
        return Ok(None);
    }
pub ( crate ) async fn find_connection_by_ssid ( & self , ssid : & SSID , ) -> Result < Option < ( dbus :: Path < ' _ > , WiFiConnectionSettings ) > , CaptivePortalError > { let connections = { use super :: generated :: connections :: Settings ; let p = nonblock :: Proxy :: new ( NM_BUSNAME , NM_SETTINGS_PATH , self . conn . clone ( ) ) ; p . connections ( ) . await ? } ; for connection_path in connections { let settings = wifi_settings :: get_connection_settings ( self . conn . clone ( ) , connection_path . clone ( ) ) . await ? ; if let Some ( settings ) = settings { // A matching connection could be found. Replace the settings with new ones and store to disk if & settings . ssid == ssid { return Ok ( Some ( ( connection_path , settings ) ) ) ; } } } return Ok ( None ) ; }
Returns the dbus network manager api connection path and the connection_id as tuple.
Returns the dbus network manager api connection path and the connection_id as tuple .
&self
ssid
&SSID
&self
ssid
&SSID