pub struct RepositoryInfo {
pub name: String,
pub root_path: String,
pub current_branch: String,
pub upstream_branch: Option<String>,
pub ahead_count: u32,
pub behind_count: u32,
pub is_clean: bool,
pub staged_files_count: usize,
}Expand description
Repository information structure
Fields§
§name: String§root_path: String§current_branch: String§upstream_branch: Option<String>§ahead_count: u32§behind_count: u32§is_clean: bool§staged_files_count: usizeImplementations§
Source§impl RepositoryInfo
impl RepositoryInfo
Sourcepub fn is_in_sync(&self) -> bool
pub fn is_in_sync(&self) -> bool
Check if the repository is in sync with upstream
Sourcepub fn has_local_changes(&self) -> bool
pub fn has_local_changes(&self) -> bool
Check if there are local changes
Sourcepub fn status_description(&self) -> String
pub fn status_description(&self) -> String
Get a human-readable status description
Trait Implementations§
Source§impl Clone for RepositoryInfo
impl Clone for RepositoryInfo
Source§fn clone(&self) -> RepositoryInfo
fn clone(&self) -> RepositoryInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RepositoryInfo
impl RefUnwindSafe for RepositoryInfo
impl Send for RepositoryInfo
impl Sync for RepositoryInfo
impl Unpin for RepositoryInfo
impl UnwindSafe for RepositoryInfo
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more