pub struct TrimPlan {
pub skipped: HashMap<String, SkipSuggestion>,
pub to_delete: HashSet<ClassifiedBranch>,
pub preserved: Vec<Preserved>,
}Fields§
§skipped: HashMap<String, SkipSuggestion>§to_delete: HashSet<ClassifiedBranch>§preserved: Vec<Preserved>Implementations§
Source§impl TrimPlan
impl TrimPlan
pub fn locals_to_delete(&self) -> Vec<&LocalBranch>
pub fn remotes_to_delete(&self, repo: &Repository) -> Result<Vec<RemoteBranch>>
Source§impl TrimPlan
impl TrimPlan
pub fn preserve_protected( &mut self, repo: &Repository, preserved_patterns: &[&str], ) -> Result<()>
Sourcepub fn preserve_non_heads_remotes(&mut self, repo: &Repository) -> Result<()>
pub fn preserve_non_heads_remotes(&mut self, repo: &Repository) -> Result<()>
hub-cli can checkout pull request branch. However they are stored in refs/pulls/.
This prevents to remove them.
pub fn preserve_worktree(&mut self, repo: &Repository) -> Result<()>
pub fn apply_delete_range_filter( &mut self, repo: &Repository, filter: &DeleteFilter, ) -> Result<()>
pub fn adjust_not_to_detach(&mut self, repo: &Repository) -> Result<()>
pub fn get_preserved_local(&self, target: &LocalBranch) -> Option<&Preserved>
pub fn get_preserved_upstream( &self, target: &RemoteTrackingBranch, ) -> Option<&Preserved>
Auto Trait Implementations§
impl Freeze for TrimPlan
impl RefUnwindSafe for TrimPlan
impl Send for TrimPlan
impl Sync for TrimPlan
impl Unpin for TrimPlan
impl UnsafeUnpin for TrimPlan
impl UnwindSafe for TrimPlan
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> 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