/// Determines the power level according to the provided set of system power modes.
///
/// The function will iterate through the configured `mode_match` entries. If a `mode_match`
/// entry is found which specifies a `SystemMode` which is contained by `system_power_modes`,
/// then the corresponding `power_level` is returned. If there is no match, then `default_level`
/// is returned.
Determines the power level according to the provided set of system power modes.
The function will iterate through the configured `mode_match` entries.
Determines the power level according to the provided set of system power modes . The function will iterate through the configured ` mode_match ` entries .
fn determine_power_level(&self, system_power_modes: &HashSet<SystemMode>) -> u64 {
        for mode_match in &self.config.mode_matches {
            if system_power_modes.contains(&mode_match.mode) {
                return mode_match.power_level;
            }
        }
        self.config.default_level
    }
fn determine_power_level ( & self , system_power_modes : & HashSet < SystemMode > ) -> u64 { for mode_match in & self . config . mode_matches { if system_power_modes . contains ( & mode_match . mode ) { return mode_match . power_level ; } } self . config . default_level }
Determines the power level according to the provided set of system power modes.
Determines the power level according to the provided set of system power modes .
&self
system_power_modes
&HashSet<SystemMode>