pub struct TreeBuilder<'repo> { /* private fields */ }
Expand description

Constructor for in-memory trees

Implementations

Clear all the entries in the builder

Get the number of entries

Return true if there is no entry

Get en entry from the builder from its filename

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.

Remove an entry from the builder by its filename

Selectively remove entries from the tree

Values for which the filter returns true will be kept. Note that this behavior is different from the libgit2 C interface.

Write the contents of the TreeBuilder as a Tree object and return its Oid

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.