ProvideFs

Trait ProvideFs 

Source
pub trait ProvideFs:
    Debug
    + Send
    + Sync
    + UnwindSafe
    + RefUnwindSafe {
    // Required methods
    fn read_to_end(
        &self,
        path: &Path,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + '_>>;
    fn write(
        &self,
        path: &Path,
        contents: &[u8],
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>;
}
Expand description

Trait for custom filesystem providers.

Required Methods§

Source

fn read_to_end( &self, path: &Path, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + '_>>

Read the entire contents of the file at path.

Source

fn write( &self, path: &Path, contents: &[u8], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>

Write contents to the file at path.

Implementors§