fn modify_system_power_mode(
        &self,
        mode: SystemMode,
        set: bool,
    ) -> Result<(), fpowermode::ModeRequestError> {
        let mut modes = self.system_power_modes.borrow_mut();

        if set {
            modes.insert(mode);
        } else {
            modes.remove(&mode);
        }

        self.inspect.set_power_modes(&modes);

        Ok(())
    }
/// Modifies the currently active system power modes.
Modifies the currently active system power modes.
Modifies the currently active system power modes .
fn modify_system_power_mode(
        &self,
        mode: SystemMode,
        set: bool,
    ) -> Result<(), fpowermode::ModeRequestError> {
        let mut modes = self.system_power_modes.borrow_mut();
        if set {
            modes.insert(mode);
        } else {
            modes.remove(&mode);
        }
        self.inspect.set_power_modes(&modes);
        Ok(())
    }
fn modify_system_power_mode ( & self , mode : SystemMode , set : bool , ) -> Result < ( ) , fpowermode :: ModeRequestError > { let mut modes = self . system_power_modes . borrow_mut ( ) ; if set { modes . insert ( mode ) ; } else { modes . remove ( & mode ) ; } self . inspect . set_power_modes ( & modes ) ; Ok ( ( ) ) }
Modifies the currently active system power modes.
Modifies the currently active system power modes .
&self
mode
SystemMode
set
bool
&self
mode
SystemMode
set
bool