pub struct Tree<'repo> {
    pub id: ObjectId,
    pub data: Vec<u8>,
    /* private fields */
}
Expand description

A decoded tree object with access to its owning repository.

Please note that the limitations described in Object apply here as well.

Fields

id: ObjectId

The id of the tree

data: Vec<u8>

The fully decoded tree data

Implementations

Return an iterator over tree entries.

Obtain a tree instance by handing in all components that it is made up of.

Follow a sequence of path components starting from this instance, and look them up one by one until the last component is looked up and its tree entry is returned.

Performance Notes

Searching tree entries is currently done in sequence, which allows to the search to be allocation free. It would be possible to re-use a vector and use a binary search instead, which might be able to improve performance over all. However, a benchmark should be created first to have some data and see which trade-off to choose here.

Obtain a platform for initiating a variety of traversals.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

The type returned in the event of a conversion error.

Performs the conversion.

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 alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

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.