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§

source

fn attribute<A: SysAttribute + Eq, T: FromStr<Err = E>, E>( &self, attr: A ) -> Result<T, EitherErr2<Error, E>>

Get an attribute on the entity

source

fn attribute_str<A: AsRef<Path>>(&self, attr: A) -> IoResult<String>

Get an attribute by filename in the entity’s directory

source

fn exists<A: SysAttribute>(&self, attr: A) -> bool

Returns true when the entity has the attribute

source

fn exists_str<A: AsRef<Path>>(&self, attr: A) -> bool

Returns true when the entity has the attribute

Implementors§