pub struct BranchRecommendation {
pub branch_name: String,
pub action: RecommendedAction,
pub reason: String,
pub priority: u8,
pub ahead: usize,
pub behind: usize,
pub days_inactive: i64,
}Expand description
Recommended action per branch
Fields§
§branch_name: StringBranch name
action: RecommendedActionRecommended action
reason: StringReason for recommendation
priority: u8Priority (higher is more urgent)
ahead: usizeahead/behind counts (when applicable)
behind: usize§days_inactive: i64Days since last activity
Implementations§
Source§impl BranchRecommendation
impl BranchRecommendation
Sourcepub fn new(
branch_name: String,
action: RecommendedAction,
reason: impl Into<String>,
priority: u8,
) -> Self
pub fn new( branch_name: String, action: RecommendedAction, reason: impl Into<String>, priority: u8, ) -> Self
Create a new recommendation
Sourcepub fn with_counts(self, ahead: usize, behind: usize) -> Self
pub fn with_counts(self, ahead: usize, behind: usize) -> Self
Set ahead/behind counts
Sourcepub fn with_days_inactive(self, days: i64) -> Self
pub fn with_days_inactive(self, days: i64) -> Self
Set days of inactivity
Trait Implementations§
Source§impl Clone for BranchRecommendation
impl Clone for BranchRecommendation
Source§fn clone(&self) -> BranchRecommendation
fn clone(&self) -> BranchRecommendation
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 BranchRecommendation
impl RefUnwindSafe for BranchRecommendation
impl Send for BranchRecommendation
impl Sync for BranchRecommendation
impl Unpin for BranchRecommendation
impl UnsafeUnpin for BranchRecommendation
impl UnwindSafe for BranchRecommendation
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