[][src]Struct supergit::files::FileTree

pub struct FileTree { /* fields omitted */ }

A git directory tree walker abstraction

This type is meant to be used ephemerally, and internally uses the libgit2 Tree abstraction to walk directory trees lazily to resolve paths to TreeEntry's.

Note: this type may be removed in the future. For a more high-level (and stable) API, check Explorer

Implementations

impl FileTree[src]

pub fn base_history(&self, iter: BranchIter, path: &str) -> Option<Vec<Commit>>[src]

Get the history of a path with a branch iterator

This function is computationally light, by not checking for renames between commits. This is done by resolving a path to a tree reference, and comparing references at the same position between two commits.

pub fn enumerate(&self, path: &str) -> Option<Vec<TreeEntry>>[src]

Enumerate a non-leaf tree entry

pub fn resolve(&self, path: &str) -> Option<TreeEntry>[src]

Resolve a path inside this file tree

Will return None if there is no tree for the selected commit, or the file inside the tree does not exist.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.