pub struct Chip { /* private fields */ }Implementations§
Source§impl Chip
impl Chip
pub fn prefix(&self) -> &str
pub fn address(&self) -> i32
pub fn path(&self) -> &Path
Sourcepub fn bus(&self) -> &BusId
pub fn bus(&self) -> &BusId
Examples found in repository?
examples/simple.rs (line 11)
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 get_name(&self) -> Result<String, LibsensorsError>
pub fn get_name(&self) -> Result<String, LibsensorsError>
Return the chip name from its internal representation.
Examples found in repository?
examples/simple.rs (line 10)
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 Chip
impl RefUnwindSafe for Chip
impl !Send for Chip
impl !Sync for Chip
impl Unpin for Chip
impl UnwindSafe for Chip
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