pub struct BusId { /* private fields */ }
Implementations§
Source§impl BusId
impl BusId
pub fn bus_type(&self) -> i16
pub fn nr(&self) -> i16
Sourcepub fn get_adapter_name(&self) -> Option<String>
pub fn get_adapter_name(&self) -> Option<String>
Return the adapter name of the bus. If it could not be found, it returns None
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}
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BusId
impl RefUnwindSafe for BusId
impl Send for BusId
impl Sync for BusId
impl Unpin for BusId
impl UnwindSafe for BusId
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