/// Creates a new `ClientStates` instance based on the provided `SystemPowerModeConfig`.
///
/// The `ClientStates` instance will initially hold a `ClientState` entry for each configured
/// client in the provided `SystemPowerModeConfig`. If an additional client is configured later
/// (via `fuchsia.power.systemmode/ClientConfigurator`) then a `ClientState` entry can be
/// created and added at that time.
Creates a new `ClientStates` instance based on the provided `SystemPowerModeConfig`.
Creates a new ` ClientStates ` instance based on the provided ` SystemPowerModeConfig ` .
fn new(
        system_power_mode_config: SystemPowerModeConfig,
        clients_inspect: inspect::Node,
    ) -> Self {
        let mut states = HashMap::new();
        system_power_mode_config.into_iter().for_each(|(client_type, config)| {
            states.insert(client_type, ClientState::new(client_type, config, &clients_inspect));
        });
        ClientStates { states: RefCell::new(states), clients_inspect }
    }
fn new ( system_power_mode_config : SystemPowerModeConfig , clients_inspect : inspect :: Node , ) -> Self { let mut states = HashMap :: new ( ) ; system_power_mode_config . into_iter ( ) . for_each ( | ( client_type , config ) | { states . insert ( client_type , ClientState :: new ( client_type , config , & clients_inspect ) ) ; } ) ; ClientStates { states : RefCell :: new ( states ) , clients_inspect } }
Creates a new `ClientStates` instance based on the provided `SystemPowerModeConfig`.
Creates a new ` ClientStates ` instance based on the provided ` SystemPowerModeConfig ` .
system_power_mode_config
SystemPowerModeConfig
clients_inspect
inspect::Node