SysEntityRawExt

Trait SysEntityRawExt 

Source
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§

Source

fn attribute<A: SysAttribute, 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

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.

Implementors§