/// Issues a call to the client policy layer to get saved networks and prints all saved network
/// configurations.
Issues a call to the client policy layer to get saved networks and prints all saved network
configurations.
Issues a call to the client policy layer to get saved networks and prints all saved network configurations .
pub async fn handle_get_saved_networks(
    client_controller: wlan_policy::ClientControllerProxy,
) -> Result<Vec<wlan_policy::NetworkConfig>, Error> {
    let (client_proxy, server_end) =
        create_proxy::<wlan_policy::NetworkConfigIteratorMarker>().unwrap();
    let fut = async { client_controller.get_saved_networks(server_end) };
    run_proxy_command(Box::pin(fut)).await?;
    let mut saved_networks = Vec::new();
    loop {
        let mut new_configs = run_proxy_command(Box::pin(client_proxy.get_next())).await?;
        if new_configs.is_empty() {
            break;
        }
        saved_networks.append(&mut new_configs);
    }
    Ok(saved_networks)
}
pub async fn handle_get_saved_networks ( client_controller : wlan_policy :: ClientControllerProxy , ) -> Result < Vec < wlan_policy :: NetworkConfig > , Error > { let ( client_proxy , server_end ) = create_proxy :: < wlan_policy :: NetworkConfigIteratorMarker > ( ) . unwrap ( ) ; let fut = async { client_controller . get_saved_networks ( server_end ) } ; run_proxy_command ( Box :: pin ( fut ) ) . await ? ; let mut saved_networks = Vec :: new ( ) ; loop { let mut new_configs = run_proxy_command ( Box :: pin ( client_proxy . get_next ( ) ) ) . await ? ; if new_configs . is_empty ( ) { break ; } saved_networks . append ( & mut new_configs ) ; } Ok ( saved_networks ) }
Issues a call to the client policy layer to get saved networks and prints all saved network
configurations.
Issues a call to the client policy layer to get saved networks and prints all saved network configurations .
client_controller
wlan_policy::ClientControllerProxy