[−][src]Struct libmedium::Hwmons
This crate's central struct. It stores all parsed hwmons which you can query either by name or by index. You should not create this struct yourself but use the parse_hwmons* functions.
Methods
impl<H: Hwmon> Hwmons<H>
[src]
pub fn path(&self) -> &Path
[src]
The path that was parsed to generate this object.
pub fn get_hwmon_by_name<T: ?Sized>(&self, name: &T) -> Option<&H> where
T: Hash + Eq,
String: Borrow<T>,
[src]
T: Hash + Eq,
String: Borrow<T>,
Get a hwmon by its name. Returns None if there is no hwmon with the given name.
pub fn get_hwmon_by_index<T: ?Sized>(&self, index: &T) -> Option<&H> where
T: Ord,
u16: Borrow<T>,
[src]
T: Ord,
u16: Borrow<T>,
Get a hwmon by its index. Returns None if there is no hwmon with the given index.
ⓘImportant traits for Iter<'a, H>pub fn iter(&self) -> Iter<H>
[src]
ⓘImportant traits for Iter<'a, H>
Returns an iterator over all hwmons, their names and their indexes.
Trait Implementations
impl<'a, H: Hwmon> IntoIterator for &'a Hwmons<H>
[src]
type Item = (u16, &'a str, &'a H)
The type of the elements being iterated over.
type IntoIter = Iter<'a, H>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<H: Clone + Hwmon> Clone for Hwmons<H>
[src]
impl<H: Debug + Hwmon> Debug for Hwmons<H>
[src]
Auto Trait Implementations
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,
impl<H> RefUnwindSafe for Hwmons<H> where
H: RefUnwindSafe,
H: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,