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§

source

fn read_to_string(&self, path: impl AsRef<Path>) -> Result<Cow<'static, str>>

source

fn canonicalize(&self, path: impl AsRef<Path>) -> Result<PathBuf>

source

fn exists(&self, path: impl AsRef<Path>) -> bool

Provided Methods§

source

fn create_dir_all(&self, _path: impl AsRef<Path>) -> Result<()>

source

fn create_file( &self, _path: impl AsRef<Path>, _contents: Cow<'static, str> ) -> Result<()>

Object Safety§

This trait is not object safe.

Implementors§