Skip to main content

StoreRead

Trait StoreRead 

Source
pub trait StoreRead {
    // Required methods
    fn read_file(&self, relative: &str) -> Result<Option<String>, CoreError>;
    fn list_files(&self, dir: &str) -> Result<Vec<String>, CoreError>;
}
Expand description

Read access to store files: the working tree (Store), the working tree plus staged changes (Transaction) or a past commit (Revision).

Required Methods§

Source

fn read_file(&self, relative: &str) -> Result<Option<String>, CoreError>

A store file as text; None if it does not exist.

Source

fn list_files(&self, dir: &str) -> Result<Vec<String>, CoreError>

Names of the files (not directories) directly in the store-relative directory dir, sorted; empty if it does not exist.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§