pub struct Checkout<'a, S> { /* private fields */ }Expand description
Builder for git checkout.
S encodes whether a target has been chosen. Only
Checkout<_, WithTarget> exposes status() / Build, so failing to
specify a target is a compile error.
See git checkout --help for full documentation.
Implementations§
Source§impl<'a> Checkout<'a, NoTarget>
impl<'a> Checkout<'a, NoTarget>
Sourcepub fn commit_ish(
self,
commit_ish: impl Into<CommitIsh<'a>>,
) -> Checkout<'a, WithTarget<'a>>
pub fn commit_ish( self, commit_ish: impl Into<CommitIsh<'a>>, ) -> Checkout<'a, WithTarget<'a>>
Select the commit-ish to check out.
Source§impl<'a> Checkout<'a, WithTarget<'a>>
impl<'a> Checkout<'a, WithTarget<'a>>
Sourcepub async fn status(self) -> Result<(), CommandError>
pub async fn status(self) -> Result<(), CommandError>
Execute the command and return the exit status.
Trait Implementations§
Source§impl<'a> Build for Checkout<'a, WithTarget<'a>>
impl<'a> Build for Checkout<'a, WithTarget<'a>>
Auto Trait Implementations§
impl<'a, S> Freeze for Checkout<'a, S>where
S: Freeze,
impl<'a, S> RefUnwindSafe for Checkout<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for Checkout<'a, S>where
S: Send,
impl<'a, S> Sync for Checkout<'a, S>where
S: Sync,
impl<'a, S> Unpin for Checkout<'a, S>where
S: Unpin,
impl<'a, S> UnsafeUnpin for Checkout<'a, S>where
S: UnsafeUnpin,
impl<'a, S> UnwindSafe for Checkout<'a, S>where
S: UnwindSafe,
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