pub struct BranchRecommendations {
pub recommendations: Vec<BranchRecommendation>,
pub delete_count: usize,
pub rebase_count: usize,
pub merge_count: usize,
pub review_count: usize,
pub total_branches: usize,
}Expand description
Branch recommendation analysis result
Fields§
§recommendations: Vec<BranchRecommendation>List of recommendations (sorted by priority)
delete_count: usizeNumber of branches recommended for deletion
rebase_count: usizeNumber of branches recommended for rebase
merge_count: usizeNumber of branches recommended for merge
review_count: usizeNumber of branches recommended for review
total_branches: usizeTotal number of branches analyzed
Implementations§
Source§impl BranchRecommendations
impl BranchRecommendations
Sourcepub fn add(&mut self, recommendation: BranchRecommendation)
pub fn add(&mut self, recommendation: BranchRecommendation)
Add a recommendation
Sourcepub fn sort_by_priority(&mut self)
pub fn sort_by_priority(&mut self)
Sort by priority
Sourcepub fn by_action(&self, action: RecommendedAction) -> Vec<&BranchRecommendation>
pub fn by_action(&self, action: RecommendedAction) -> Vec<&BranchRecommendation>
Get recommendations for a specific action
Sourcepub fn deletable_branches(&self) -> Vec<&str>
pub fn deletable_branches(&self) -> Vec<&str>
Get list of branch names recommended for deletion
Sourcepub fn get_recommendation(
&self,
branch_name: &str,
) -> Option<&BranchRecommendation>
pub fn get_recommendation( &self, branch_name: &str, ) -> Option<&BranchRecommendation>
Get recommendation by branch name
Trait Implementations§
Source§impl Clone for BranchRecommendations
impl Clone for BranchRecommendations
Source§fn clone(&self) -> BranchRecommendations
fn clone(&self) -> BranchRecommendations
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 moreSource§impl Debug for BranchRecommendations
impl Debug for BranchRecommendations
Source§impl Default for BranchRecommendations
impl Default for BranchRecommendations
Source§fn default() -> BranchRecommendations
fn default() -> BranchRecommendations
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BranchRecommendations
impl RefUnwindSafe for BranchRecommendations
impl Send for BranchRecommendations
impl Sync for BranchRecommendations
impl Unpin for BranchRecommendations
impl UnsafeUnpin for BranchRecommendations
impl UnwindSafe for BranchRecommendations
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