Trait sysfuss::SysEntityRawExt
source · pub trait SysEntityRawExt: SysEntity {
// Required methods
fn attribute<A: SysAttribute + Eq, T: FromStr<Err = E>, E>(
&self,
attr: A
) -> Result<T, EitherErr2<Error, E>>;
fn attribute_str<A: AsRef<Path>>(&self, attr: A) -> IoResult<String>;
fn exists<A: SysAttribute>(&self, attr: A) -> bool;
fn exists_str<A: AsRef<Path>>(&self, attr: A) -> bool;
}Expand description
sysfs class entity functionality extension
Required Methods§
sourcefn attribute<A: SysAttribute + Eq, T: FromStr<Err = E>, E>(
&self,
attr: A
) -> Result<T, EitherErr2<Error, E>>
fn attribute<A: SysAttribute + Eq, T: FromStr<Err = E>, E>( &self, attr: A ) -> Result<T, EitherErr2<Error, E>>
Get an attribute on the entity
sourcefn attribute_str<A: AsRef<Path>>(&self, attr: A) -> IoResult<String>
fn attribute_str<A: AsRef<Path>>(&self, attr: A) -> IoResult<String>
Get an attribute by filename in the entity’s directory
sourcefn exists<A: SysAttribute>(&self, attr: A) -> bool
fn exists<A: SysAttribute>(&self, attr: A) -> bool
Returns true when the entity has the attribute
sourcefn exists_str<A: AsRef<Path>>(&self, attr: A) -> bool
fn exists_str<A: AsRef<Path>>(&self, attr: A) -> bool
Returns true when the entity has the attribute