pub struct PowerOptimizer { /* private fields */ }Expand description
Power optimization manager
Implementations§
Source§impl PowerOptimizer
impl PowerOptimizer
Sourcepub fn new(config: PowerConfig) -> Self
pub fn new(config: PowerConfig) -> Self
Create a new power optimizer
Sourcepub fn update_state(
&mut self,
battery_level: f32,
thermal_temp: f32,
cpu_usage: f32,
gpu_usage: Option<f32>,
memory_usage: f32,
source_count: u32,
quality_level: f32,
)
pub fn update_state( &mut self, battery_level: f32, thermal_temp: f32, cpu_usage: f32, gpu_usage: Option<f32>, memory_usage: f32, source_count: u32, quality_level: f32, )
Update system state and optimize power consumption
Sourcepub fn get_optimized_config(&self) -> SpatialConfig
pub fn get_optimized_config(&self) -> SpatialConfig
Get optimized spatial configuration for current power state
Sourcepub fn get_metrics(&self) -> PowerMetrics
pub fn get_metrics(&self) -> PowerMetrics
Get current power metrics
Sourcepub fn set_power_strategy(&mut self, strategy: PowerStrategy)
pub fn set_power_strategy(&mut self, strategy: PowerStrategy)
Force a specific power strategy
Sourcepub fn set_aggressive_power_saving(&mut self, enabled: bool)
pub fn set_aggressive_power_saving(&mut self, enabled: bool)
Enable/disable aggressive power saving
Sourcepub fn should_optimize(&self) -> bool
pub fn should_optimize(&self) -> bool
Check if optimization update is needed
Auto Trait Implementations§
impl Freeze for PowerOptimizer
impl RefUnwindSafe for PowerOptimizer
impl Send for PowerOptimizer
impl Sync for PowerOptimizer
impl Unpin for PowerOptimizer
impl UnsafeUnpin for PowerOptimizer
impl UnwindSafe for PowerOptimizer
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more