pub struct HwMonAttribute { /* private fields */ }Expand description
Attribute representation.
Attribute files are usually in the format <type><number>_<item>.
Implementations§
Source§impl HwMonAttribute
impl HwMonAttribute
Sourcepub const fn new(
ty: HwMonAttributeType,
number: u64,
item: HwMonAttributeItem,
) -> Self
pub const fn new( ty: HwMonAttributeType, number: u64, item: HwMonAttributeItem, ) -> Self
Custom attribute in standard format
Trait Implementations§
Source§impl Clone for HwMonAttribute
impl Clone for HwMonAttribute
Source§fn clone(&self) -> HwMonAttribute
fn clone(&self) -> HwMonAttribute
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl PartialEq for HwMonAttribute
impl PartialEq for HwMonAttribute
Source§impl SysAttribute for HwMonAttribute
impl SysAttribute for HwMonAttribute
Source§impl SysEntityAttributes<HwMonAttribute> for HwMonPath
impl SysEntityAttributes<HwMonAttribute> for HwMonPath
Source§fn capabilities(&self) -> Vec<HwMonAttribute>
fn capabilities(&self) -> Vec<HwMonAttribute>
Get attributes available on this entity;
impl Copy for HwMonAttribute
impl Eq for HwMonAttribute
impl StructuralPartialEq for HwMonAttribute
Auto Trait Implementations§
impl Freeze for HwMonAttribute
impl RefUnwindSafe for HwMonAttribute
impl Send for HwMonAttribute
impl Sync for HwMonAttribute
impl Unpin for HwMonAttribute
impl UnwindSafe for HwMonAttribute
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<X> SysAttributeExt for Xwhere
X: SysAttribute + Eq,
impl<X> SysAttributeExt for Xwhere
X: SysAttribute + Eq,
Source§fn read_str<E: SysEntity + ?Sized>(&self, entity: &E) -> IoResult<String>
fn read_str<E: SysEntity + ?Sized>(&self, entity: &E) -> IoResult<String>
read attribute as string
Source§fn write_str<E: SysEntity + ?Sized>(&self, entity: &E, s: &str) -> IoResult<()>
fn write_str<E: SysEntity + ?Sized>(&self, entity: &E, s: &str) -> IoResult<()>
write attribute string value to sysfsfilter_map
Source§fn parse<T: FromStr<Err = E>, E, ENT: SysEntity + ?Sized>(
&self,
entity: &ENT,
) -> Result<T, EitherErr2<Error, E>>
fn parse<T: FromStr<Err = E>, E, ENT: SysEntity + ?Sized>( &self, entity: &ENT, ) -> Result<T, EitherErr2<Error, E>>
read and parse the attribute value
Source§fn exists<E: SysEntity + ?Sized>(&self, entity: &E) -> bool
fn exists<E: SysEntity + ?Sized>(&self, entity: &E) -> bool
returns true if the path to the attribute file exists
Source§fn read_value<E: SysEntity + ?Sized>(&self, entity: &E) -> IoResult<Vec<u8>>
fn read_value<E: SysEntity + ?Sized>(&self, entity: &E) -> IoResult<Vec<u8>>
read attribute value from sysfs