pub struct Sensors { /* private fields */ }Implementations§
Source§impl Sensors
impl Sensors
Sourcepub fn new() -> Self
pub fn new() -> Self
Examples found in repository?
examples/simple.rs (line 6)
5fn main() {
6 let sensors = Sensors::new();
7 for chip in sensors {
8 println!(
9 "{} (on {})",
10 chip.get_name().unwrap(),
11 chip.bus().get_adapter_name().unwrap()
12 );
13 for feature in chip {
14 println!(" - {}", feature.get_label().unwrap());
15 for subfeature in feature {
16 println!(
17 " - {} = {}",
18 subfeature.name(),
19 subfeature.get_value().unwrap()
20 );
21 }
22 }
23 }
24}Sourcepub fn detected_chips<S: AsRef<str>>(
&self,
name: S,
) -> Result<ChipIterator, LibsensorsError>
pub fn detected_chips<S: AsRef<str>>( &self, name: S, ) -> Result<ChipIterator, LibsensorsError>
Returns an iterator over all detected chips that match a given chip name
Trait Implementations§
Source§impl IntoIterator for Sensors
impl IntoIterator for Sensors
impl Copy for Sensors
Auto Trait Implementations§
impl Freeze for Sensors
impl RefUnwindSafe for Sensors
impl Send for Sensors
impl Sync for Sensors
impl Unpin for Sensors
impl UnwindSafe for Sensors
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more