Skip to main content

TreeReader

Trait TreeReader 

Source
pub trait TreeReader {
    // Required methods
    fn tree_hash(&self, revision: &str, path: &str) -> AppResult<TreeHash>;
    fn file_at(&self, revision: &str, path: &str) -> AppResult<Vec<u8>>;
    fn list_entries(
        &self,
        revision: &str,
        path: &str,
    ) -> AppResult<Vec<TreeEntry>>;
}
Expand description

Read access to git tree objects.

Required Methods§

Source

fn tree_hash(&self, revision: &str, path: &str) -> AppResult<TreeHash>

Returns the OID of the tree at the given path and revision.

Source

fn file_at(&self, revision: &str, path: &str) -> AppResult<Vec<u8>>

Returns the content of a file at the given revision and path.

Source

fn list_entries(&self, revision: &str, path: &str) -> AppResult<Vec<TreeEntry>>

Returns the entries in a tree at the given revision and path.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§