pub struct Upstream {
pub reference: String,
pub commit: String,
pub behind: usize,
pub ahead: usize,
}Expand description
The remote-tracking ref a resolved base is measured against, and the two reachability counts that say how far apart they are.
Both counts, never one. “Behind by 17” and “behind by 17, ahead by 3” are
different situations with different consequences — the first over-reports a
change, the second can omit it — and a single number could not tell them
apart. See Repo::resolve_base.
Fields§
§reference: StringFull name of the tracking ref (refs/remotes/origin/main).
commit: StringThe commit it points at, in full hex.
behind: usizeCommits the upstream has that the base does not — base..upstream.
ahead: usizeCommits the base has that the upstream does not — upstream..base.
Implementations§
Source§impl Upstream
impl Upstream
Sourcepub fn short_commit(&self) -> &str
pub fn short_commit(&self) -> &str
The first twelve hex digits of Upstream::commit; see
BaseResolution::short_commit.
Trait Implementations§
impl Eq for Upstream
impl StructuralPartialEq for Upstream
Auto Trait Implementations§
impl Freeze for Upstream
impl RefUnwindSafe for Upstream
impl Send for Upstream
impl Sync for Upstream
impl Unpin for Upstream
impl UnsafeUnpin for Upstream
impl UnwindSafe for Upstream
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.