pub struct LMSensors { /* private fields */ }
Implementations§
Source§impl LMSensors
impl LMSensors
Sourcepub fn version(&self) -> Option<&str>
pub fn version(&self) -> Option<&str>
Returns the version of the LM sensors library, if available and valid UTF-8.
Sourcepub fn raw_version(&self) -> Option<&CStr>
pub fn raw_version(&self) -> Option<&CStr>
Returns the raw version of the LM sensors library, if available.
Sourcepub unsafe fn new_chip_ref<'sensors>(
&'sensors self,
chip: &'sensors sensors_chip_name,
) -> ChipRef<'sensors>
pub unsafe fn new_chip_ref<'sensors>( &'sensors self, chip: &'sensors sensors_chip_name, ) -> ChipRef<'sensors>
Return a new instance of ChipRef
, given a shared reference
to a raw chip.
§Safety
- The given
sensors_chip_name
reference must have been returned from [sensors_get_detected_chips
].
Sourcepub unsafe fn new_raw_chip(&self, chip: sensors_chip_name) -> Chip<'_>
pub unsafe fn new_raw_chip(&self, chip: sensors_chip_name) -> Chip<'_>
Return a new instance of Chip
, given a raw chip.
§Safety
- The given
sensors_chip_name
must have been previously initialized by calling [sensors_parse_chip_name
].
Sourcepub fn new_chip<'sensors>(&'sensors self, name: &str) -> Result<Chip<'sensors>>
pub fn new_chip<'sensors>(&'sensors self, name: &str) -> Result<Chip<'sensors>>
Return a new instance of Chip
, given a chip name.
Sourcepub fn new_raw_bus(&self, kind: c_short, number: c_short) -> Bus
pub fn new_raw_bus(&self, kind: c_short, number: c_short) -> Bus
Return a new instance of Bus
, given a raw (bus type, bus number).
Sourcepub fn new_bus(&self, kind: Kind, number: Number) -> Bus
pub fn new_bus(&self, kind: Kind, number: Number) -> Bus
Return a new instance of Bus
, given a (bus type, bus number).
Sourcepub fn default_bus(&self) -> Bus
pub fn default_bus(&self) -> Bus
Return a new default instance of Bus
.
Sourcepub unsafe fn new_feature_ref<'sensors>(
&'sensors self,
chip: ChipRef<'sensors>,
raw: &'sensors sensors_feature,
) -> FeatureRef<'sensors>
pub unsafe fn new_feature_ref<'sensors>( &'sensors self, chip: ChipRef<'sensors>, raw: &'sensors sensors_feature, ) -> FeatureRef<'sensors>
Return a new instance of FeatureRef
given a shared reference
to a raw feature.
§Safety
- The given
sensors_feature
reference must have been returned from [sensors_get_features
].
Sourcepub unsafe fn new_sub_feature_ref<'sensors>(
&'sensors self,
feature: FeatureRef<'sensors>,
raw: &'sensors sensors_subfeature,
) -> SubFeatureRef<'sensors>
pub unsafe fn new_sub_feature_ref<'sensors>( &'sensors self, feature: FeatureRef<'sensors>, raw: &'sensors sensors_subfeature, ) -> SubFeatureRef<'sensors>
Return a new instance of SubFeatureRef
given a shared reference
to a raw sub-feature.
§Safety
- The given
sensors_subfeature
reference must have been returned either from [sensors_get_all_subfeatures
] or from [sensors_get_subfeature
].
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LMSensors
impl !RefUnwindSafe for LMSensors
impl !Send for LMSensors
impl !Sync for LMSensors
impl Unpin for LMSensors
impl !UnwindSafe for LMSensors
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