pub enum ThermalState {
Normal,
Light,
Moderate,
Severe,
Critical,
Emergency,
Shutdown,
}Expand description
The operating system’s thermal-pressure level.
Variants§
Normal
No thermal pressure.
Light
Light pressure; ordinary work may continue.
Moderate
Sustained work should be reduced.
Severe
Expensive work should pause.
Critical
The device is close to forced shutdown.
Emergency
Emergency pressure reported by the platform.
Shutdown
The platform is shutting down because of heat.
Implementations§
Source§impl ThermalState
impl ThermalState
Sourcepub fn should_pause_work(self) -> bool
pub fn should_pause_work(self) -> bool
Whether sustained, expensive work should stop at this level.
Trait Implementations§
Source§impl Clone for ThermalState
impl Clone for ThermalState
Source§fn clone(&self) -> ThermalState
fn clone(&self) -> ThermalState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ThermalState
Source§impl Debug for ThermalState
impl Debug for ThermalState
Source§impl Default for ThermalState
impl Default for ThermalState
Source§fn default() -> ThermalState
fn default() -> ThermalState
Returns the “default value” for a type. Read more
impl Eq for ThermalState
Source§impl Ord for ThermalState
impl Ord for ThermalState
Source§fn cmp(&self, other: &ThermalState) -> Ordering
fn cmp(&self, other: &ThermalState) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ThermalState
impl PartialEq for ThermalState
Source§impl PartialOrd for ThermalState
impl PartialOrd for ThermalState
impl StructuralPartialEq for ThermalState
Auto Trait Implementations§
impl Freeze for ThermalState
impl RefUnwindSafe for ThermalState
impl Send for ThermalState
impl Sync for ThermalState
impl Unpin for ThermalState
impl UnsafeUnpin for ThermalState
impl UnwindSafe for ThermalState
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