pub struct PowerProfiles { /* private fields */ }Expand description
The power profile, from cx.power_profiles(). Cloning it is cheap.
Implementations§
Source§impl PowerProfiles
impl PowerProfiles
Sourcepub fn active(&self) -> ReadSignal<Option<PowerProfile>>
pub fn active(&self) -> ReadSignal<Option<PowerProfile>>
The profile in effect. None while power-profiles-daemon isn’t
running, or in a profile this list doesn’t know.
Sourcepub fn available(&self) -> ReadSignal<Vec<PowerProfile>>
pub fn available(&self) -> ReadSignal<Vec<PowerProfile>>
The profiles this machine offers, in the daemon’s order. Laptops without a performance mode leave it out.
Sourcepub fn degradation(&self) -> ReadSignal<PerformanceDegradation>
pub fn degradation(&self) -> ReadSignal<PerformanceDegradation>
Why the performance profile runs slower than it could, which shows whichever profile is active.
Sourcepub fn set(&self, profile: PowerProfile)
pub fn set(&self, profile: PowerProfile)
Asks the daemon to switch to profile. It shows in active
once the daemon says it did. A refusal, such as one polkit makes,
is logged.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PowerProfiles
impl !Send for PowerProfiles
impl !Sync for PowerProfiles
impl !UnwindSafe for PowerProfiles
impl Forget for PowerProfiles
impl Freeze for PowerProfiles
impl Move for PowerProfiles
impl Unpin for PowerProfiles
impl UnsafeUnpin for PowerProfiles
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more