[−][src]Struct libmedium::Hwmons
This crate's central struct. It stores all parsed hwmons which you can query either by name or by index.
Implementations
impl<H: Hwmon> Hwmons<H>
[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 = &H>
[src]
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<&H>
[src]
Get a Hwmon
by its index.
Returns None if there is no Hwmon
with the given index.
pub fn iter(&self) -> Iter<H>
[src]
Returns an iterator over all hwmons, their names and their indices.
impl Hwmons<ReadOnlyHwmon>
[src]
pub fn parse_read_only() -> Result<Self, Error>
[src]
Parses /sys/class/hwmon and returns the found hwmons as a Hwmons object.
impl Hwmons<ReadWriteHwmon>
[src]
pub fn parse_read_write() -> Result<Self, Error>
[src]
Parses /sys/class/hwmon and returns the found hwmons as a Hwmons object. Be sure you have sufficient rights to write to your sensors. Usually only root has those rights.
Trait Implementations
impl<H: Clone + Hwmon> Clone for Hwmons<H>
[src]
impl<H: Debug + Hwmon> Debug for Hwmons<H>
[src]
impl<'a, H: Hwmon> IntoIterator for &'a Hwmons<H>
[src]
Auto Trait Implementations
impl<H> RefUnwindSafe for Hwmons<H> where
H: RefUnwindSafe,
H: RefUnwindSafe,
impl<H> Send for Hwmons<H> where
H: Send,
H: Send,
impl<H> Sync for Hwmons<H> where
H: Sync,
H: Sync,
impl<H> Unpin for Hwmons<H> where
H: Unpin,
H: Unpin,
impl<H> UnwindSafe for Hwmons<H> where
H: UnwindSafe,
H: UnwindSafe,
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,
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.
fn to_owned(&self) -> T
[src]
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.
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>,