Struct sysfs_class::HwMon [−][src]
pub struct HwMon { /* fields omitted */ }A hardware monitoring device in /sys/class/hwmon
Methods
impl HwMon[src]
impl HwMonpub fn name(&self) -> Result<String>[src]
pub fn name(&self) -> Result<String>pub fn fan<'a>(&'a self, id: u64) -> Result<HwMonFan<'a>>[src]
pub fn fan<'a>(&'a self, id: u64) -> Result<HwMonFan<'a>>pub fn pwm<'a>(&'a self, id: u64) -> Result<HwMonPwm<'a>>[src]
pub fn pwm<'a>(&'a self, id: u64) -> Result<HwMonPwm<'a>>pub fn temp<'a>(&'a self, id: u64) -> Result<HwMonTemp<'a>>[src]
pub fn temp<'a>(&'a self, id: u64) -> Result<HwMonTemp<'a>>Trait Implementations
impl Clone for HwMon[src]
impl Clone for HwMonfn clone(&self) -> HwMon[src]
fn clone(&self) -> HwMonReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl SysClass for HwMon[src]
impl SysClass for HwMonfn class() -> &'static str[src]
fn class() -> &'static strReturn the class of the sys object, the name of a folder in /sys/class
unsafe fn from_path_unchecked(path: PathBuf) -> Self[src]
unsafe fn from_path_unchecked(path: PathBuf) -> SelfCreate a sys object from an absolute path without checking path for validity
fn path(&self) -> &Path[src]
fn path(&self) -> &PathReturn the path of the sys object
fn dir() -> PathBuf[src]
fn dir() -> PathBufReturn the path to the sys objects, the full path of a folder in /sys/class
fn from_path(path: &Path) -> Result<Self>[src]
fn from_path(path: &Path) -> Result<Self>Create a sys object from a path, checking it for validity
fn all() -> Result<Vec<Self>>[src]
fn all() -> Result<Vec<Self>>Retrieve all of the object instances of a sys class
fn new(id: &str) -> Result<Self>[src]
fn new(id: &str) -> Result<Self>Create a sys object by id, checking it for validity
fn id(&self) -> &str[src]
fn id(&self) -> &strReturn the id of the sys object
fn read_file<P: AsRef<Path>>(&self, name: P) -> Result<String>[src]
fn read_file<P: AsRef<Path>>(&self, name: P) -> Result<String>Read a file underneath the sys object
fn parse_file<F: FromStr, P: AsRef<Path>>(&self, name: P) -> Result<F> where
F::Err: Display, [src]
fn parse_file<F: FromStr, P: AsRef<Path>>(&self, name: P) -> Result<F> where
F::Err: Display, Parse a number from a file underneath the sys object
fn trim_file<P: AsRef<Path>>(&self, name: P) -> Result<String>[src]
fn trim_file<P: AsRef<Path>>(&self, name: P) -> Result<String>Read a file underneath the sys object and trim whitespace
fn write_file<P: AsRef<Path>, S: AsRef<[u8]>>(
&self,
name: P,
data: S
) -> Result<()>[src]
fn write_file<P: AsRef<Path>, S: AsRef<[u8]>>(
&self,
name: P,
data: S
) -> Result<()>Write a file underneath the sys object