[][src]Struct libmedium::Hwmons

pub struct Hwmons<H: Hwmon> { /* fields omitted */ }

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]

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]

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]

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?

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

impl<H> Sync for Hwmons<H> where
    H: Sync

impl<H> Unpin for Hwmons<H> where
    H: Unpin

impl<H> UnwindSafe for Hwmons<H> where
    H: UnwindSafe

impl<H> RefUnwindSafe for Hwmons<H> where
    H: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]