/// Create FakeSavedNetworksManager, saving network configs with the specified
/// network identifiers and credentials at init.
Create FakeSavedNetworksManager, saving network configs with the specified
network identifiers and credentials at init.
Create FakeSavedNetworksManager saving network configs with the specified network identifiers and credentials at init .
pub fn new_with_saved_networks(network_configs: Vec<(NetworkIdentifier, Credential)>) -> Self {
        let saved_networks = network_configs
            .into_iter()
            .filter_map(|(id, cred)| {
                NetworkConfig::new(id.clone(), cred, false).ok().map(|config| (id, vec![config]))
            })
            .collect::<HashMap<NetworkIdentifier, Vec<NetworkConfig>>>();
        Self {
            saved_networks: Mutex::new(saved_networks),
            disconnects_recorded: Mutex::new(vec![]),
            fail_all_stores: false,
            active_scan_result_recorded: Arc::new(Mutex::new(false)),
            passive_scan_result_recorded: Arc::new(Mutex::new(false)),
            past_connections_response: PastConnectionList::new(),
        }
    }
pub fn new_with_saved_networks ( network_configs : Vec < ( NetworkIdentifier , Credential ) > ) -> Self { let saved_networks = network_configs . into_iter ( ) . filter_map ( | ( id , cred ) | { NetworkConfig :: new ( id . clone ( ) , cred , false ) . ok ( ) . map ( | config | ( id , vec ! [ config ] ) ) } ) . collect :: < HashMap < NetworkIdentifier , Vec < NetworkConfig > > > ( ) ; Self { saved_networks : Mutex :: new ( saved_networks ) , disconnects_recorded : Mutex :: new ( vec ! [ ] ) , fail_all_stores : false , active_scan_result_recorded : Arc :: new ( Mutex :: new ( false ) ) , passive_scan_result_recorded : Arc :: new ( Mutex :: new ( false ) ) , past_connections_response : PastConnectionList :: new ( ) , } }
Create FakeSavedNetworksManager, saving network configs with the specified
network identifiers and credentials at init.
Create FakeSavedNetworksManager saving network configs with the specified network identifiers and credentials at init .
network_configs
Vec<(NetworkIdentifier, Credential)>