pub struct PressureSample {
pub level: PressureLevel,
pub used_fraction: f64,
pub previous: PressureLevel,
}Expand description
The outcome of classifying one memory sample.
Fields§
§level: PressureLevelThe classified level.
used_fraction: f64The used fraction (0.0–1.0) that produced the classification.
previous: PressureLevelThe previous level before this sample (for transition detection).
Implementations§
Source§impl PressureSample
impl PressureSample
Sourcepub fn escalated(&self) -> bool
pub fn escalated(&self) -> bool
Returns true if this sample represents a transition into a strictly
more severe level than the previous sample.
Sourcepub fn de_escalated(&self) -> bool
pub fn de_escalated(&self) -> bool
Returns true if this sample represents a transition into a strictly
less severe level than the previous sample.
Trait Implementations§
Source§impl Clone for PressureSample
impl Clone for PressureSample
Source§fn clone(&self) -> PressureSample
fn clone(&self) -> PressureSample
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 PressureSample
Source§impl Debug for PressureSample
impl Debug for PressureSample
Source§impl PartialEq for PressureSample
impl PartialEq for PressureSample
Source§fn eq(&self, other: &PressureSample) -> bool
fn eq(&self, other: &PressureSample) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PressureSample
Auto Trait Implementations§
impl Freeze for PressureSample
impl RefUnwindSafe for PressureSample
impl Send for PressureSample
impl Sync for PressureSample
impl Unpin for PressureSample
impl UnsafeUnpin for PressureSample
impl UnwindSafe for PressureSample
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