Skip to main content

Fs

Trait Fs 

Source
pub trait Fs {
    // Required methods
    fn read(&self, path: &Utf8Path) -> Result<Vec<u8>>;
    fn write(&self, path: &Utf8Path, bytes: &[u8]) -> Result<()>;
    fn exists(&self, path: &Utf8Path) -> Result<bool>;
}

Required Methods§

Source

fn read(&self, path: &Utf8Path) -> Result<Vec<u8>>

Source

fn write(&self, path: &Utf8Path, bytes: &[u8]) -> Result<()>

Source

fn exists(&self, path: &Utf8Path) -> Result<bool>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T: Fs + ?Sized> Fs for Arc<T>

Source§

fn read(&self, path: &Utf8Path) -> Result<Vec<u8>>

Source§

fn write(&self, path: &Utf8Path, bytes: &[u8]) -> Result<()>

Source§

fn exists(&self, path: &Utf8Path) -> Result<bool>

Implementors§