Trait sysfuss::SysEntityAttributes
source · pub trait SysEntityAttributes<A: SysAttribute + Eq>: SysEntity + Sized {
// Required method
fn capabilities(&self) -> Vec<A>;
// Provided methods
fn read_value(&self, attr: A) -> IoResult<Vec<u8>> { ... }
fn write_value(&self, attr: A, value: &[u8]) -> IoResult<()> { ... }
}Expand description
sysfs class entity attribute type indicator
Required Methods§
sourcefn capabilities(&self) -> Vec<A>
fn capabilities(&self) -> Vec<A>
Get attributes available on this entity;
Provided Methods§
sourcefn read_value(&self, attr: A) -> IoResult<Vec<u8>>
fn read_value(&self, attr: A) -> IoResult<Vec<u8>>
Read entity attribute value
sourcefn write_value(&self, attr: A, value: &[u8]) -> IoResult<()>
fn write_value(&self, attr: A, value: &[u8]) -> IoResult<()>
Write entity attribute value