pub struct Outcome<'name> {
    pub name: Option<Cow<'name, BStr>>,
    pub id: ObjectId,
    pub depth: u32,
    pub name_by_oid: HashedMap<ObjectId, Cow<'name, BStr>>,
    pub commits_seen: u32,
}
Expand description

The positive result produced by describe().

Fields

name: Option<Cow<'name, BStr>>

The name of the tag or branch that is closest to the commit id.

If None, no name was found but it was requested to provide the id itself as fallback.

id: ObjectId

The input commit object id that we describe.

depth: u32

The number of commits that are between the tag or branch with name and id. These commits are all in the future of the named tag or branch.

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

The mapping between object ids and their names initially provided by the describe call.

commits_seen: u32

The amount of commits we traversed.

Implementations

Turn this outcome into a structure that can display itself in the typical git describe format.

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

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

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.