#[non_exhaustive]pub struct UpstreamTracking {
pub branch: String,
pub ahead: usize,
pub behind: usize,
}Expand description
Upstream tracking for the current branch: the upstream ref and how far the
branch is ahead/behind it. Only meaningful as a whole — git reports the three
together or not at all — so RepoSnapshot carries it as one
Option<UpstreamTracking> rather than three coupled Options.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.branch: StringThe upstream tracking branch, e.g. "origin/main".
ahead: usizeCommits the local branch is ahead of the upstream.
behind: usizeCommits the local branch is behind the upstream.
Trait Implementations§
Source§impl Clone for UpstreamTracking
impl Clone for UpstreamTracking
Source§fn clone(&self) -> UpstreamTracking
fn clone(&self) -> UpstreamTracking
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UpstreamTracking
impl Debug for UpstreamTracking
impl Eq for UpstreamTracking
Source§impl PartialEq for UpstreamTracking
impl PartialEq for UpstreamTracking
Source§fn eq(&self, other: &UpstreamTracking) -> bool
fn eq(&self, other: &UpstreamTracking) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for UpstreamTracking
impl Serialize for UpstreamTracking
impl StructuralPartialEq for UpstreamTracking
Auto Trait Implementations§
impl Freeze for UpstreamTracking
impl RefUnwindSafe for UpstreamTracking
impl Send for UpstreamTracking
impl Sync for UpstreamTracking
impl Unpin for UpstreamTracking
impl UnsafeUnpin for UpstreamTracking
impl UnwindSafe for UpstreamTracking
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