pub struct Options<'name> {
    pub name_by_oid: HashedMap<ObjectId, Cow<'name, BStr>>,
    pub max_candidates: usize,
    pub fallback_to_oid: bool,
    pub first_parent: bool,
}
Expand description

The options required to call describe().

Fields

name_by_oid: HashedMap<ObjectId, Cow<'name, BStr>>

The candidate names from which to determine the name to use for the describe string, as a mapping from a commit id and the name associated with it.

max_candidates: usize

The amount of names we will keep track of. Defaults to the maximum of 32.

If the number is exceeded, it will be capped at 32 and defaults to 10.

fallback_to_oid: bool

If no candidate for naming, always show the abbreviated hash. Default: false.

first_parent: bool

Only follow the first parent during graph traversal. Default: false.

This may speed up the traversal at the cost of accuracy.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a 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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. 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.