pub enum SyncState {
NoUpstream,
Synced,
HasUnpushedCommits {
count: usize,
},
Behind {
count: usize,
},
Diverged {
ahead: usize,
behind: usize,
},
}Expand description
Sync state with upstream
Variants§
NoUpstream
No upstream tracking branch
Synced
Synced with upstream
HasUnpushedCommits
Has commits not pushed to upstream
Behind
Behind upstream
Diverged
Diverged (both ahead and behind)
Implementations§
Source§impl SyncState
impl SyncState
Sourcepub fn has_unpushed(&self) -> bool
pub fn has_unpushed(&self) -> bool
Check if there are unpushed commits
Sourcepub fn unpushed_count(&self) -> usize
pub fn unpushed_count(&self) -> usize
Get the number of unpushed commits, if any
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Get a human-readable description
Trait Implementations§
impl Eq for SyncState
impl StructuralPartialEq for SyncState
Auto Trait Implementations§
impl Freeze for SyncState
impl RefUnwindSafe for SyncState
impl Send for SyncState
impl Sync for SyncState
impl Unpin for SyncState
impl UnwindSafe for SyncState
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