Struct git2::TreeBuilder [−][src]
pub struct TreeBuilder<'repo> { /* fields omitted */ }Expand description
Constructor for in-memory trees
Implementations
impl<'repo> TreeBuilder<'repo>[src]
impl<'repo> TreeBuilder<'repo>[src]pub fn get<P>(&self, filename: P) -> Result<Option<TreeEntry<'_>>, Error> where
P: IntoCString, [src]
pub fn get<P>(&self, filename: P) -> Result<Option<TreeEntry<'_>>, Error> where
P: IntoCString, [src]Get en entry from the builder from its filename
pub fn insert<P: IntoCString>(
&mut self,
filename: P,
oid: Oid,
filemode: i32
) -> Result<TreeEntry<'_>, Error>[src]
pub fn insert<P: IntoCString>(
&mut self,
filename: P,
oid: Oid,
filemode: i32
) -> Result<TreeEntry<'_>, Error>[src]Add or update an entry in the builder
No attempt is made to ensure that the provided Oid points to an object of a reasonable type (or any object at all).
The mode given must be one of 0o040000, 0o100644, 0o100755, 0o120000 or 0o160000 currently.
pub fn remove<P: IntoCString>(&mut self, filename: P) -> Result<(), Error>[src]
pub fn remove<P: IntoCString>(&mut self, filename: P) -> Result<(), Error>[src]Remove an entry from the builder by its filename