pub struct GitStatusModule;Expand description
Module that summarizes Git working tree and index state
Displays indicators for:
- Modified files (working tree changes)
- Staged files (index changes)
- Untracked files
- Branch ahead/behind status relative to upstream
- Conflicted files during merge
§Configuration
[git_status]
format = "[$all_status$ahead_behind]($style)"
style = "bold red"
conflicted = "="
ahead = "⇡"
behind = "⇣"
diverged = "⇕"
untracked = "?"
stashed = "$"
modified = "!"
staged = "+"
renamed = "»"
deleted = "✘"
disabled = false§Display Format
Shows compact symbols for repository state, e.g.:
[!]- Has modified files[+]- Has staged changes[⇡3]- Ahead by 3 commits[⇣2]- Behind by 2 commits
Implementations§
Source§impl GitStatusModule
impl GitStatusModule
pub fn new() -> Self
pub fn from_context(_context: &Context) -> Self
Trait Implementations§
Source§impl Default for GitStatusModule
impl Default for GitStatusModule
Source§impl Module for GitStatusModule
impl Module for GitStatusModule
Source§fn should_display(&self, context: &Context, config: &dyn ModuleConfig) -> bool
fn should_display(&self, context: &Context, config: &dyn ModuleConfig) -> bool
Determines if this module should be displayed
Auto Trait Implementations§
impl Freeze for GitStatusModule
impl RefUnwindSafe for GitStatusModule
impl Send for GitStatusModule
impl Sync for GitStatusModule
impl Unpin for GitStatusModule
impl UnsafeUnpin for GitStatusModule
impl UnwindSafe for GitStatusModule
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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