pub enum CheckoutTarget {
Ref(RevSpec),
Previous,
}Expand description
What GitApi::checkout switches to: a validated ref/revision, or git’s -
“previous branch” shortcut.
- is the one place a leading-- token is legitimate — it is git’s
@{-1} shorthand, not caller-controlled argv — so it is modelled as a
distinct Previous variant emitting a fixed
literal, rather than punching a hole in RevSpec’s no-leading--
invariant (which the other commit-ish operations rely on).
Variants§
Ref(RevSpec)
Check out this validated ref or revision.
Previous
Check out the previous branch (git checkout -).
Implementations§
Trait Implementations§
Source§impl Clone for CheckoutTarget
impl Clone for CheckoutTarget
Source§fn clone(&self) -> CheckoutTarget
fn clone(&self) -> CheckoutTarget
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CheckoutTarget
impl Debug for CheckoutTarget
impl Eq for CheckoutTarget
Source§impl From<RevSpec> for CheckoutTarget
impl From<RevSpec> for CheckoutTarget
Source§impl PartialEq for CheckoutTarget
impl PartialEq for CheckoutTarget
impl StructuralPartialEq for CheckoutTarget
Auto Trait Implementations§
impl Freeze for CheckoutTarget
impl RefUnwindSafe for CheckoutTarget
impl Send for CheckoutTarget
impl Sync for CheckoutTarget
impl Unpin for CheckoutTarget
impl UnsafeUnpin for CheckoutTarget
impl UnwindSafe for CheckoutTarget
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