pub struct RefEntry {
pub kind: RefKind,
pub name: String,
pub id: String,
pub short_id: String,
pub upstream: String,
pub track: String,
pub head: bool,
pub subject: String,
}Expand description
One ref, and where it points.
Fields§
§kind: RefKind§name: StringThe short name — main, origin/main, v1.0.0.
id: StringFull object id. Callers that hand an id to another git command use this one: an abbreviation is ambiguous in principle, and git resolves the ambiguity by refusing — which would surface as a ref that opens nothing.
short_id: StringAbbreviated object id, for display.
upstream: StringThe configured upstream’s short name, empty when there is none.
Only ever set for RefKind::Branch.
track: StringGit’s own ahead/behind summary — [ahead 2], [behind 1],
[ahead 3, behind 1], [gone] — with the brackets stripped.
Empty when the branch is level with its upstream or has none.
head: boolIs this the checked-out branch?
subject: StringThe subject line of the commit (or of the tag, when annotated).
Trait Implementations§
impl Eq for RefEntry
impl StructuralPartialEq for RefEntry
Auto Trait Implementations§
impl Freeze for RefEntry
impl RefUnwindSafe for RefEntry
impl Send for RefEntry
impl Sync for RefEntry
impl Unpin for RefEntry
impl UnsafeUnpin for RefEntry
impl UnwindSafe for RefEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more