Skip to main content

FileStore

Trait FileStore 

Source
pub trait FileStore {
    // Required methods
    fn read(&self, path: &str) -> GeopResult<String>;
    fn list(&self) -> Vec<String>;
}
Expand description

Where Files reads files from.

Required Methods§

Source

fn read(&self, path: &str) -> GeopResult<String>

The text of the file path.

Source

fn list(&self) -> Vec<String>

Every file there is, by path: programs and the files they read.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl FileStore for BTreeMap<String, String>

Files held in memory, by path: what an editor is sent by its front end.

Source§

fn read(&self, path: &str) -> GeopResult<String>

Source§

fn list(&self) -> Vec<String>

Source§

impl FileStore for Box<dyn FileStoreMut>

Files of a store chosen at run time: an editor’s, whose files are whatever its front end keeps, with whatever library beside them.

Source§

fn read(&self, path: &str) -> GeopResult<String>

Source§

fn list(&self) -> Vec<String>

Implementors§