pub struct Subfeature { /* private fields */ }Implementations§
Source§impl Subfeature
impl Subfeature
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Examples found in repository?
examples/simple.rs (line 18)
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}pub fn subfeature_type(&self) -> &SubfeatureType
Sourcepub fn get_value(&self) -> Result<f64, LibsensorsError>
pub fn get_value(&self) -> Result<f64, LibsensorsError>
Read the value of the subfeature.
Examples found in repository?
examples/simple.rs (line 19)
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}Trait Implementations§
Auto Trait Implementations§
impl Freeze for Subfeature
impl RefUnwindSafe for Subfeature
impl !Send for Subfeature
impl !Sync for Subfeature
impl Unpin for Subfeature
impl UnwindSafe for Subfeature
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