pub struct Bus(/* private fields */);Expand description
Bus connection of some Kind, e.g., PCI.
Implementations§
Source§impl Bus
impl Bus
Sourcepub fn name(&self) -> Result<&str>
pub fn name(&self) -> Result<&str>
Return the adapter name of this bus.
If it could not be found, it returns an error.
Sourcepub fn raw_name(&self) -> Result<&CStr>
pub fn raw_name(&self) -> Result<&CStr>
Return the adapter name of this bus (type, number) pair, as used
within [sensors_chip_name].
If it could not be found, it returns an error.
See: sensors_get_adapter_name.
Sourcepub fn raw_kind(&self) -> c_short
pub fn raw_kind(&self) -> c_short
Return one of SENSORS_BUS_TYPE_* values,
e.g., SENSORS_BUS_TYPE_ANY.
Sourcepub fn raw_number(&self) -> c_short
pub fn raw_number(&self) -> c_short
Return a number, or one of SENSORS_BUS_NR_* values,
e.g., SENSORS_BUS_NR_ANY.
Sourcepub fn set_number(&mut self, number: Number)
pub fn set_number(&mut self, number: Number)
Set the bus number.
Sourcepub fn set_raw_kind(&mut self, kind: c_short)
pub fn set_raw_kind(&mut self, kind: c_short)
Set the bus type to one of SENSORS_BUS_TYPE_* values,
e.g., SENSORS_BUS_TYPE_PCI.
Sourcepub fn set_raw_number(&mut self, number: c_short)
pub fn set_raw_number(&mut self, number: c_short)
Set the bus number to one of SENSORS_BUS_NR_* values
(e.g., SENSORS_BUS_NR_ANY), or to a specific number.
Trait Implementations§
Source§impl AsMut<sensors_bus_id> for Bus
impl AsMut<sensors_bus_id> for Bus
Source§fn as_mut(&mut self) -> &mut sensors_bus_id
fn as_mut(&mut self) -> &mut sensors_bus_id
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl AsRef<sensors_bus_id> for Bus
impl AsRef<sensors_bus_id> for Bus
Source§fn as_ref(&self) -> &sensors_bus_id
fn as_ref(&self) -> &sensors_bus_id
Converts this type into a shared reference of the (usually inferred) input type.
impl Copy for Bus
impl Eq for Bus
impl StructuralPartialEq for Bus
Auto Trait Implementations§
impl Freeze for Bus
impl RefUnwindSafe for Bus
impl Send for Bus
impl Sync for Bus
impl Unpin for Bus
impl UnwindSafe for Bus
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