pub async fn load(&self) -> Result<HashMap<NetworkIdentifier, Vec<NetworkConfig>>, Error> {
        // get all the children nodes of root, which represent the unique identifiers,
        let id_nodes = self.root.children().await?;
        let mut network_configs = HashMap::new();

        // for each child representing a network config, read in values
        for id_node in id_nodes {
            let mut config_list = vec![];
            let net_id = self.id_from_key(&id_node)?;
            for config_node in id_node.children().await? {
                let network_config = Self::read_config(net_id.clone(), &config_node).await?;
                config_list.push(network_config);
            }
            network_configs.insert(net_id, config_list);
        }

        Ok(network_configs)
    }
/// Load all saved network configs from stash. Will create HashMap of network configs by SSID
/// as saved in the stash
Load all saved network configs from stash. Will create HashMap of network configs by SSID
as saved in the stash
Load all saved network configs from stash . Will create HashMap of network configs by SSID as saved in the stash
pub async fn load(&self) -> Result<HashMap<NetworkIdentifier, Vec<NetworkConfig>>, Error> {
        // get all the children nodes of root, which represent the unique identifiers,
        let id_nodes = self.root.children().await?;
        let mut network_configs = HashMap::new();
        // for each child representing a network config, read in values
        for id_node in id_nodes {
            let mut config_list = vec![];
            let net_id = self.id_from_key(&id_node)?;
            for config_node in id_node.children().await? {
                let network_config = Self::read_config(net_id.clone(), &config_node).await?;
                config_list.push(network_config);
            }
            network_configs.insert(net_id, config_list);
        }
        Ok(network_configs)
    }
pub async fn load ( & self ) -> Result < HashMap < NetworkIdentifier , Vec < NetworkConfig > > , Error > { // get all the children nodes of root, which represent the unique identifiers, let id_nodes = self . root . children ( ) . await ? ; let mut network_configs = HashMap :: new ( ) ; // for each child representing a network config, read in values for id_node in id_nodes { let mut config_list = vec ! [ ] ; let net_id = self . id_from_key ( & id_node ) ? ; for config_node in id_node . children ( ) . await ? { let network_config = Self :: read_config ( net_id . clone ( ) , & config_node ) . await ? ; config_list . push ( network_config ) ; } network_configs . insert ( net_id , config_list ) ; } Ok ( network_configs ) }
Load all saved network configs from stash.
Load all saved network configs from stash .
&self
&self