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