Skip to main content

SysfsOps

Trait SysfsOps 

Source
pub trait SysfsOps<S: SynchronousProxy>:
    Default
    + Send
    + Sync
    + 'static {
    // Provided methods
    fn show(&self, _service: &S) -> Result<String, SysfsError> { ... }
    fn store(&self, _service: &S, _value: String) -> Result<(), SysfsError> { ... }
}
Expand description

Operations supported by sysfs files.

These are analogous to (but not identical to) the operations exposed by Linux sysfs attributes.

Provided Methods§

Source

fn show(&self, _service: &S) -> Result<String, SysfsError>

Get the value of the attribute.

Source

fn store(&self, _service: &S, _value: String) -> Result<(), SysfsError>

Store a new value for the attribute.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§