pub struct RepositoryState {Show 13 fields
pub exists: bool,
pub is_git_repo: bool,
pub current_branch: String,
pub is_detached: bool,
pub has_uncommitted: bool,
pub has_unpushed: bool,
pub tracking_branch: String,
pub default_branch: String,
pub commits_behind: i64,
pub commits_ahead: i64,
pub remote_url: String,
pub remote_matches: bool,
pub last_error: Option<GitError>,
}Expand description
Ported from RepositoryState in interface.go.
Fields§
§exists: bool§is_git_repo: bool§current_branch: StringEmpty if detached.
is_detached: bool§has_uncommitted: bool§has_unpushed: bool§tracking_branch: Stringe.g. “origin/main”.
default_branch: Stringe.g. “main”.
commits_behind: i64§commits_ahead: i64§remote_url: String§remote_matches: bool§last_error: Option<GitError>Trait Implementations§
Source§impl Debug for RepositoryState
impl Debug for RepositoryState
Source§impl Default for RepositoryState
impl Default for RepositoryState
Source§fn default() -> RepositoryState
fn default() -> RepositoryState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RepositoryState
impl RefUnwindSafe for RepositoryState
impl Send for RepositoryState
impl Sync for RepositoryState
impl Unpin for RepositoryState
impl UnsafeUnpin for RepositoryState
impl UnwindSafe for RepositoryState
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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