//! tree Operation trait for the tree module (tree access on bare repositories based on gix). use gix::hash::ObjectId; use crate::tree::types::{EntryFollowResult, PathLastUpdated, PathResult, Tree, TreeEntry}; /// Operation trait for the tree module. pub trait TreeOps { /// Read a tree. fn tree_read(&self, id: &ObjectId) -> Result; /// Resolve a tree entry by path. fn tree_resolve_path(&self, tree_id: &ObjectId, path: &str) -> Result; /// Walk a tree (recursive). fn tree_walk(&self, tree_id: &ObjectId) -> Result, crate::Error>; /// Follow a symbolic link. fn tree_follow(&self, entry: &TreeEntry) -> Result; /// Last-update time for every tree/blob in the given commit's tree. fn tree_last_updated(&self, rev: &str) -> Result, crate::Error>; }