Trait re_renderer::FileSystem
source · pub trait FileSystem {
// Required methods
fn read_to_string(
&self,
path: impl AsRef<Path>
) -> Result<Cow<'static, str>>;
fn canonicalize(&self, path: impl AsRef<Path>) -> Result<PathBuf>;
fn exists(&self, path: impl AsRef<Path>) -> bool;
// Provided methods
fn create_dir_all(&self, _path: impl AsRef<Path>) -> Result<()> { ... }
fn create_file(
&self,
_path: impl AsRef<Path>,
_contents: Cow<'static, str>
) -> Result<()> { ... }
}
Expand description
A very limited filesystem, just enough for our internal needs.
Required Methods§
fn read_to_string(&self, path: impl AsRef<Path>) -> Result<Cow<'static, str>>
fn canonicalize(&self, path: impl AsRef<Path>) -> Result<PathBuf>
fn exists(&self, path: impl AsRef<Path>) -> bool
Provided Methods§
fn create_dir_all(&self, _path: impl AsRef<Path>) -> Result<()>
fn create_file( &self, _path: impl AsRef<Path>, _contents: Cow<'static, str> ) -> Result<()>
Object Safety§
This trait is not object safe.