Struct broot::git::TreeGitStatus
source · pub struct TreeGitStatus {
pub current_branch_name: Option<String>,
pub insertions: usize,
pub deletions: usize,
}
Expand description
Fields§
§current_branch_name: Option<String>
§insertions: usize
§deletions: usize
Implementations§
source§impl TreeGitStatus
impl TreeGitStatus
sourcepub fn from(repo: &Repository) -> Option<Self>
pub fn from(repo: &Repository) -> Option<Self>
Examples found in repository?
src/git/status_computer.rs (line 20)
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
fn compute_tree_status(root_path: &Path) -> ComputationResult<TreeGitStatus> {
match Repository::open(root_path) {
Ok(git_repo) => {
let tree_git_status = time!(TreeGitStatus::from(&git_repo),);
match tree_git_status {
Some(gs) => ComputationResult::Done(gs),
None => ComputationResult::None,
}
}
Err(e) => {
debug!("failed to discover repo: {:?}", e);
ComputationResult::None
}
}
}
Trait Implementations§
source§impl Clone for TreeGitStatus
impl Clone for TreeGitStatus
source§fn clone(&self) -> TreeGitStatus
fn clone(&self) -> TreeGitStatus
Returns a copy 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 more