pub struct ChipRef<'sensors>(/* private fields */);Expand description
Shared reference to a chip connected to sensors or actuators.
Implementations§
Source§impl<'sensors> ChipRef<'sensors>
impl<'sensors> ChipRef<'sensors>
Sourcepub fn raw_ref(self) -> &'sensors sensors_chip_name
pub fn raw_ref(self) -> &'sensors sensors_chip_name
Returns a shared reference to the raw data structure sensors_chip_name.
Sourcepub fn feature_iter(self) -> Iter<'sensors> ⓘ
pub fn feature_iter(self) -> Iter<'sensors> ⓘ
Return an iterator which yields all sensors and actuators (a.k.a., features) controlled by this chip.
Sourcepub fn prefix(self) -> Option<Result<&'sensors str>>
pub fn prefix(self) -> Option<Result<&'sensors str>>
Return the prefix of this chip, if it is valid UTF-8.
Sourcepub fn path(self) -> Option<&'sensors Path>
pub fn path(self) -> Option<&'sensors Path>
Return the path of the driver of this chip, if available.
Sourcepub fn do_chip_sets(self) -> Result<()>
pub fn do_chip_sets(self) -> Result<()>
Execute all set statements for this chip.
See: sensors_do_chip_sets.
Sourcepub fn raw_prefix(self) -> Option<&'sensors CStr>
pub fn raw_prefix(self) -> Option<&'sensors CStr>
Return the raw prefix of this chip, if available.
Sourcepub fn raw_path(self) -> Option<&'sensors CStr>
pub fn raw_path(self) -> Option<&'sensors CStr>
Return the raw path of the driver of this chip, if available.
Sourcepub fn raw_address(self) -> c_int
pub fn raw_address(self) -> c_int
Return the raw address of this chip, which is either a number,
or SENSORS_CHIP_NAME_ADDR_ANY.
Trait Implementations§
impl<'sensors> Copy for ChipRef<'sensors>
impl<'sensors> Eq for ChipRef<'sensors>
Auto Trait Implementations§
impl<'sensors> Freeze for ChipRef<'sensors>
impl<'sensors> RefUnwindSafe for ChipRef<'sensors>
impl<'sensors> !Send for ChipRef<'sensors>
impl<'sensors> !Sync for ChipRef<'sensors>
impl<'sensors> Unpin for ChipRef<'sensors>
impl<'sensors> UnwindSafe for ChipRef<'sensors>
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