async fn create_network_store(stash_id: impl AsRef<str>) -> SavedNetworksPtr {
        let temp_dir = TempDir::new().expect("failed to create temp dir");
        let path = temp_dir.path().join("networks.json");
        let tmp_path = temp_dir.path().join("tmp.json");
        let saved_networks = Arc::new(
            SavedNetworksManager::new_with_stash_or_paths(stash_id, path, tmp_path)
                .await
                .expect("Failed to create a KnownEssStore"),
        );
        let network_id_none = NetworkIdentifier::new(b"foobar".to_vec(), SecurityType::None);
        let network_id_password =
            NetworkIdentifier::new(b"foobar-protected".to_vec(), SecurityType::Wpa2);
        let network_id_psk = NetworkIdentifier::new(b"foobar-psk".to_vec(), SecurityType::Wpa2);

        saved_networks.store(network_id_none, Credential::None).expect("error saving network");
        saved_networks
            .store(network_id_password, Credential::Password(b"supersecure".to_vec()))
            .expect("error saving network");
        saved_networks
            .store(network_id_psk, Credential::Psk(vec![64; 64].to_vec()))
            .expect("error saving network foobar-psk");

        saved_networks
    }
/// Creates an ESS Store holding entries for protected and unprotected networks.
Creates an ESS Store holding entries for protected and unprotected networks.
Creates an ESS Store holding entries for protected and unprotected networks .
async fn create_network_store(stash_id: impl AsRef<str>) -> SavedNetworksPtr {
        let temp_dir = TempDir::new().expect("failed to create temp dir");
        let path = temp_dir.path().join("networks.json");
        let tmp_path = temp_dir.path().join("tmp.json");
        let saved_networks = Arc::new(
            SavedNetworksManager::new_with_stash_or_paths(stash_id, path, tmp_path)
                .await
                .expect("Failed to create a KnownEssStore"),
        );
        let network_id_none = NetworkIdentifier::new(b"foobar".to_vec(), SecurityType::None);
        let network_id_password =
            NetworkIdentifier::new(b"foobar-protected".to_vec(), SecurityType::Wpa2);
        let network_id_psk = NetworkIdentifier::new(b"foobar-psk".to_vec(), SecurityType::Wpa2);
        saved_networks.store(network_id_none, Credential::None).expect("error saving network");
        saved_networks
            .store(network_id_password, Credential::Password(b"supersecure".to_vec()))
            .expect("error saving network");
        saved_networks
            .store(network_id_psk, Credential::Psk(vec![64; 64].to_vec()))
            .expect("error saving network foobar-psk");
        saved_networks
    }
async fn create_network_store ( stash_id : impl AsRef < str > ) -> SavedNetworksPtr { let temp_dir = TempDir :: new ( ) . expect ( " " ) ; let path = temp_dir . path ( ) . join ( " " ) ; let tmp_path = temp_dir . path ( ) . join ( " " ) ; let saved_networks = Arc :: new ( SavedNetworksManager :: new_with_stash_or_paths ( stash_id , path , tmp_path ) . await . expect ( " " ) , ) ; let network_id_none = NetworkIdentifier :: new ( b" " . to_vec ( ) , SecurityType :: None ) ; let network_id_password = NetworkIdentifier :: new ( b" " . to_vec ( ) , SecurityType :: Wpa2 ) ; let network_id_psk = NetworkIdentifier :: new ( b" " . to_vec ( ) , SecurityType :: Wpa2 ) ; saved_networks . store ( network_id_none , Credential :: None ) . expect ( " " ) ; saved_networks . store ( network_id_password , Credential :: Password ( b" " . to_vec ( ) ) ) . expect ( " " ) ; saved_networks . store ( network_id_psk , Credential :: Psk ( vec ! [ 64 64 ] . to_vec ( ) ) ) . expect ( " " ) ; saved_networks }
Creates an ESS Store holding entries for protected and unprotected networks.
Creates an ESS Store holding entries for protected and unprotected networks .
stash_id
impl AsRef<str>
stash_id
impl AsRef<str>