/// Communicates with the client policy layer to remove a network.
Communicates with the client policy layer to remove a network.
Communicates with the client policy layer to remove a network .
pub async fn handle_remove_network(
    client_controller: wlan_policy::ClientControllerProxy,
    config: wlan_policy::NetworkConfig,
) -> Result<(), Error> {
    let id = config.id.clone();
    let (ssid, _) = extract_network_id(id).expect("Failed to convert network ssid.");
    run_proxy_command(Box::pin(client_controller.remove_network(config)))
        .await?
        .map_err(|e| format_err!("failed to remove network with {:?}", e))?;
    println!("Successfully removed network '{}'", ssid);
    Ok(())
}
pub async fn handle_remove_network ( client_controller : wlan_policy :: ClientControllerProxy , config : wlan_policy :: NetworkConfig , ) -> Result < ( ) , Error > { let id = config . id . clone ( ) ; let ( ssid , _ ) = extract_network_id ( id ) . expect ( " " ) ; run_proxy_command ( Box :: pin ( client_controller . remove_network ( config ) ) ) . await ? . map_err ( | e | format_err ! ( " " e ) ) ? ; println ! ( " " ssid ) ; Ok ( ( ) ) }
Communicates with the client policy layer to remove a network.
Communicates with the client policy layer to remove a network .
client_controller
wlan_policy::ClientControllerProxy
config
wlan_policy::NetworkConfig