Trait amdgpu_sysfs::sysfs::SysFS
source · pub trait SysFS {
// Required method
fn get_path(&self) -> &Path;
// Provided methods
fn read_file(&self, file: impl AsRef<Path> + Debug) -> Result<String, Error> { ... }
fn read_file_parsed<T: FromStr<Err = E>, E: ToString>(
&self,
file: &str
) -> Result<T, Error> { ... }
fn write_file<C: AsRef<[u8]> + Send>(
&self,
file: &str,
contents: C
) -> Result<(), Error> { ... }
}Expand description
General functionality of a SysFS.
Required Methods§
Provided Methods§
sourcefn read_file(&self, file: impl AsRef<Path> + Debug) -> Result<String, Error>
fn read_file(&self, file: impl AsRef<Path> + Debug) -> Result<String, Error>
Reads the content of a file in the SysFS.
Object Safety§
This trait is not object safe.