PowerProfileMonitorExt

Trait PowerProfileMonitorExt 

Source
pub trait PowerProfileMonitorExt: IsA<PowerProfileMonitor> + 'static {
    // Provided methods
    fn is_power_saver_enabled(&self) -> bool { ... }
    fn connect_power_saver_enabled_notify<F>(&self, f: F) -> SignalHandlerId
       where F: Fn(&Self) + 'static { ... }
}
Expand description

Trait containing all PowerProfileMonitor methods.

§Implementors

PowerProfileMonitor

Provided Methods§

Source

fn is_power_saver_enabled(&self) -> bool

Gets whether the system is in “Power Saver” mode.

You are expected to listen to the #GPowerProfileMonitor::notify::power-saver-enabled signal to know when the profile has changed.

§Returns

Whether the system is in “Power Saver” mode.

Source

fn connect_power_saver_enabled_notify<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&Self) + 'static,

Available on crate feature v2_70 only.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§