Struct git2::Tree
[−]
[src]
pub struct Tree<'repo> { /* fields omitted */ }
A structure to represent a git tree
Methods
impl<'repo> Tree<'repo>
[src]
fn id(&self) -> Oid
[src]
Get the id (SHA1) of a repository object
fn len(&self) -> usize
[src]
Get the number of entries listed in this tree.
fn is_empty(&self) -> bool
[src]
Return true
if there is not entry
fn iter(&self) -> TreeIter
[src]
Returns an iterator over the entries in this tree.
fn get_id(&self, id: Oid) -> Option<TreeEntry>
[src]
Lookup a tree entry by SHA value.
fn get(&self, n: usize) -> Option<TreeEntry>
[src]
Lookup a tree entry by its position in the tree
fn get_name(&self, filename: &str) -> Option<TreeEntry>
[src]
Lookup a tree entry by its filename
fn get_path(&self, path: &Path) -> Result<TreeEntry<'static>, Error>
[src]
Retrieve a tree entry contained in a tree or in any of its subtrees, given its relative path.
fn as_object(&self) -> &Object<'repo>
[src]
Casts this Tree to be usable as an Object
fn into_object(self) -> Object<'repo>
[src]
Consumes Commit to be returned as an Object
Trait Implementations
impl<'repo> Debug for Tree<'repo>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter.
impl<'repo> Clone for Tree<'repo>
[src]
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more