Trait industrial_io::ToAttribute
source · pub trait ToAttribute: Display {
fn to_attr(&self) -> Result<String> { ... }
}
Expand description
Trait to convert a value to a proper attribute string.
Provided Methods§
Implementations on Foreign Types§
source§impl ToAttribute for bool
impl ToAttribute for bool
Attribute conversion for the bool type.
The bool type needs a special implementation of the attribute conversion trait because it’s default Rust string counterparts are “true” and “false” for true and false values respectively. However, sysfs expects these to be “1” or “0”.