pub async fn wait_for_connectivity(
        &self,
        internet_connectivity: bool,
        timeout: std::time::Duration,
    ) -> Result<NetworkManagerState, CaptivePortalError> {
        self.connectivity_changed(timeout, |state| {
            state == NetworkManagerState::Connected
                || (state == NetworkManagerState::ConnectedLimited && !internet_connectivity)
        })
            .await
    }
/// The returned future resolves when either the timeout expired or state of the
/// **active** connection (eg /org/freedesktop/NetworkManager/ActiveConnection/12) is the expected state
/// or changes into the expected state.
The returned future resolves when either the timeout expired or state of the
active** connection  is the expected state
or changes into the expected state.
The returned future resolves when either the timeout expired or state of the active ** connection is the expected state or changes into the expected state .
pub async fn wait_for_connectivity(
        &self,
        internet_connectivity: bool,
        timeout: std::time::Duration,
    ) -> Result<NetworkManagerState, CaptivePortalError> {
        self.connectivity_changed(timeout, |state| {
            state == NetworkManagerState::Connected
                || (state == NetworkManagerState::ConnectedLimited && !internet_connectivity)
        })
            .await
    }
pub async fn wait_for_connectivity ( & self , internet_connectivity : bool , timeout : std :: time :: Duration , ) -> Result < NetworkManagerState , CaptivePortalError > { self . connectivity_changed ( timeout , | state | { state == NetworkManagerState :: Connected || ( state == NetworkManagerState :: ConnectedLimited && ! internet_connectivity ) } ) . await }
The returned future resolves when either the timeout expired or state of the
active** connection (eg /org/freedesktop/NetworkManager/ActiveConnection/12) is the expected state
or changes into the expected state.
The returned future resolves when either the timeout expired or state of the active ** connection ( eg / org / freedesktop / NetworkManager / ActiveConnection / 12 ) is the expected state or changes into the expected state .
&self
internet_connectivity
bool
timeout
std::time::Duration
&self
internet_connectivity
bool
timeout
std::time::Duration