SysEntityAttributesExt

Trait SysEntityAttributesExt 

Source
pub trait SysEntityAttributesExt<A: SysAttribute>: SysEntityAttributes<A> + Sized {
    // Provided methods
    fn capable<C: Capabilities<A, Self>>(&self, capabilities: C) -> bool { ... }
    fn attribute<T: FromStr<Err = E>, E>(
        &self,
        attr: A,
    ) -> Result<T, EitherErr2<Error, E>> { ... }
    fn set<V: ToString>(&self, attr: A, value: V) -> IoResult<()> { ... }
    fn read_value(&self, attr: &A) -> IoResult<Vec<u8>> { ... }
    fn write_value(&self, attr: &A, value: &[u8]) -> IoResult<()> { ... }
    fn exists(&self, attr: &A) -> bool { ... }
}
Expand description

sysfs class entity attribute type extension

Provided Methods§

Source

fn capable<C: Capabilities<A, Self>>(&self, capabilities: C) -> bool

Returns true if self is capable of the provided capabilities

Source

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

Get an attribute on the entity

Source

fn set<V: ToString>(&self, attr: A, value: V) -> IoResult<()>

Set an attribute on the entity

Source

fn read_value(&self, attr: &A) -> IoResult<Vec<u8>>

Read entity attribute value

Source

fn write_value(&self, attr: &A, value: &[u8]) -> IoResult<()>

Write entity attribute value

Source

fn exists(&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§