pub struct ResourceGuardConfig {
pub battery_threshold: u8,
pub cpu_threshold: u8,
pub check_interval: Duration,
pub cpu_consecutive_checks: u32,
}Expand description
Resource guard configuration.
Fields§
§battery_threshold: u8Battery percentage threshold (pause below this)
cpu_threshold: u8CPU usage threshold (pause above this)
check_interval: DurationCheck interval
cpu_consecutive_checks: u32Number of consecutive checks above threshold before pausing
Trait Implementations§
Source§impl Clone for ResourceGuardConfig
impl Clone for ResourceGuardConfig
Source§impl Debug for ResourceGuardConfig
impl Debug for ResourceGuardConfig
Auto Trait Implementations§
impl Forget for ResourceGuardConfig
impl Freeze for ResourceGuardConfig
impl Move for ResourceGuardConfig
impl RefUnwindSafe for ResourceGuardConfig
impl Send for ResourceGuardConfig
impl Sync for ResourceGuardConfig
impl Unpin for ResourceGuardConfig
impl UnsafeUnpin for ResourceGuardConfig
impl UnwindSafe for ResourceGuardConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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