pub struct AmdMon {
pub pwm_min: Option<u32>,
pub pwm_max: Option<u32>,
/* private fields */
}
Fields§
§pwm_min: Option<u32>
Minimal modulation (between 0-255)
pwm_max: Option<u32>
Maximal modulation (between 0-255)
Implementations§
Source§impl AmdMon
impl AmdMon
pub fn wrap_all(mons: Vec<HwMon>, config: &Config) -> Vec<Self>
pub fn wrap(hw_mon: HwMon, config: &Config) -> Self
Sourcepub fn gpu_temp(&self) -> Vec<(&String, Result<f64>)>
pub fn gpu_temp(&self) -> Vec<(&String, Result<f64>)>
Returns name and gpu temperature percent of maximum GPU temperature range
pub fn gpu_temp_of(&self, input_idx: usize) -> Option<(&String, Result<f64>)>
pub fn read_gpu_temp(&self, name: &str) -> Result<u64>
pub fn gpu_usage_of(&self, input_idx: usize) -> Option<(&String, Result<f64>)>
pub fn read_gpu_usage(&self, name: &str) -> Result<u16>
pub fn pwm(&self) -> Result<u32>
pub fn pwm_min(&mut self) -> u32
pub fn pwm_max(&mut self) -> u32
pub fn max_gpu_temp(&self) -> Result<f64>
Methods from Deref<Target = HwMon>§
pub fn card(&self) -> &Card
pub fn name(&self) -> Result<String, AmdGpuError>
Sourcepub fn gpu_usage(&self) -> Result<f64, AmdGpuError>
pub fn gpu_usage(&self) -> Result<f64, AmdGpuError>
GPU usage percent
pub fn read_gpu_usage(&self) -> Result<u16, AmdGpuError>
pub fn is_amd(&self) -> bool
pub fn name_is_amd(&self) -> bool
pub fn device_dir(&self) -> PathBuf
pub fn mon_dir(&self) -> PathBuf
pub fn value_or<R>(&self, name: &str, fallback: R) -> Rwhere
R: FromStr,
pub fn hw_mon_read(&self, name: &str) -> Result<String, AmdGpuError>
pub fn device_read(&self, name: &str) -> Result<String, AmdGpuError>
pub fn hw_mon_write(&self, name: &str, value: u64) -> Result<(), AmdGpuError>
pub fn device_write<C>(&self, name: &str, value: C) -> Result<(), AmdGpuError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AmdMon
impl RefUnwindSafe for AmdMon
impl Send for AmdMon
impl Sync for AmdMon
impl Unpin for AmdMon
impl UnwindSafe for AmdMon
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