Struct intel_pstate::PState
source · pub struct PState { /* private fields */ }
Expand description
Handle for fetching and modifying Intel PState kernel parameters.
Note
- Currently, ony Linux is supported.
- Setting parameters will require root permissions.
Implementations
sourceimpl PState
impl PState
sourcepub fn new() -> Result<PState>
pub fn new() -> Result<PState>
Attempt to fetch a handle to the Intel PState sysfs kernel instance.
sourcepub fn min_perf_pct(&self) -> Result<u64>
pub fn min_perf_pct(&self) -> Result<u64>
Get the minimum performance percent.
sourcepub fn set_min_perf_pct(&self, value: u64) -> Result<()>
pub fn set_min_perf_pct(&self, value: u64) -> Result<()>
Set the minimum performance percent.
sourcepub fn max_perf_pct(&self) -> Result<u64>
pub fn max_perf_pct(&self) -> Result<u64>
Get the maximum performance percent.
sourcepub fn set_max_perf_pct(&self, value: u64) -> Result<()>
pub fn set_max_perf_pct(&self, value: u64) -> Result<()>
Set the maximum performance percent.
sourcepub fn set_no_turbo(&self, value: bool) -> Result<()>
pub fn set_no_turbo(&self, value: bool) -> Result<()>
Set the no_turbo value; true
will disable turbo.
Auto Trait Implementations
impl RefUnwindSafe for PState
impl Send for PState
impl Sync for PState
impl Unpin for PState
impl UnwindSafe for PState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more