[−][src]Struct libmedium::hwmon::Hwmons
This crate's central struct.
It stores all parsed Hwmon
s which you can query either by name, device path or index.
Implementations
impl Hwmons
[src]
pub fn path(&self) -> &Path
[src]
The path that was parsed to generate this object.
pub fn hwmons_by_name(
&self,
name: impl AsRef<str>
) -> impl Iterator<Item = &Hwmon>
[src]
&self,
name: impl AsRef<str>
) -> impl Iterator<Item = &Hwmon>
Get Hwmon
s by their name.
Returns an empty iterator, if there is no Hwmon
with the given name.
pub fn hwmon_by_index(&self, index: usize) -> Option<&Hwmon>
[src]
Get a Hwmon
by its index.
Returns None
, if there is no Hwmon
with the given index.
pub fn hwmon_by_device_path(
&self,
device_path: impl AsRef<Path>
) -> Option<&Hwmon>
[src]
&self,
device_path: impl AsRef<Path>
) -> Option<&Hwmon>
Get a Hwmon
by its device path.
Returns None
, if there is no Hwmon
with the given device path.
pub fn iter(&self) -> Iter<'_>
[src]
Returns an iterator over all hwmons, their names and their indices.
pub fn parse() -> Result<Self, Error>
[src]
Parses /sys/class/hwmon and returns the found hwmons as a Hwmons object.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Hwmons
impl Send for Hwmons
impl Sync for Hwmons
impl Unpin for Hwmons
impl UnwindSafe for Hwmons
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,