pub struct BranchCommands;
Expand description
Branch-related commands grouped together
Implementations§
Source§impl BranchCommands
impl BranchCommands
Sourcepub fn new_branch(name: &str, from: Option<&str>) -> Result<String>
pub fn new_branch(name: &str, from: Option<&str>) -> Result<String>
Create a new branch command
Sourcepub fn clean_branches(dry_run: bool) -> Result<String>
pub fn clean_branches(dry_run: bool) -> Result<String>
Clean merged branches command
Sourcepub fn switch_recent() -> Result<String>
pub fn switch_recent() -> Result<String>
Switch to recent branch command
Sourcepub fn rename_branch(new_name: &str) -> Result<String>
pub fn rename_branch(new_name: &str) -> Result<String>
Rename current branch command
Sourcepub fn prune_branches(dry_run: bool) -> Result<String>
pub fn prune_branches(dry_run: bool) -> Result<String>
Prune remote branches command
Sourcepub fn stash_branch(branch_name: &str) -> Result<String>
pub fn stash_branch(branch_name: &str) -> Result<String>
Stash current work into a branch
Auto Trait Implementations§
impl Freeze for BranchCommands
impl RefUnwindSafe for BranchCommands
impl Send for BranchCommands
impl Sync for BranchCommands
impl Unpin for BranchCommands
impl UnwindSafe for BranchCommands
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