pub trait SysEntityRawExt: SysEntity {
// Required methods
fn attribute<A: SysAttribute, 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, T: FromStr<Err = E>, E>(
&self,
attr: A,
) -> Result<T, EitherErr2<Error, E>>
fn attribute<A: SysAttribute, 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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.