pub enum CurrentBranch {
NotReported,
Unresolved(String),
Branch(RefName),
}Expand description
What prikk’s status report says about its current branch.
Three states, kept apart in the type rather than folded into an Option<String> (C-T2c′):
“this prikk has no pointer”, “prikk has a pointer it cannot resolve” and “prikk names this branch” are
three different facts, and the change token hashes each distinctly so no two of them can compose the
same token.
Variants§
NotReported
Below prikk 0.42, which prints no current branch: line: there is no pointer to report.
Unresolved(String)
prikk has a pointer it cannot resolve — malformed, or naming a branch that is missing or closed.
Carries prikk’s text after the label verbatim (ER-02), e.g.
<unresolved; run `prikk doctor`> at prikk 0.42.0.
Branch(RefName)
The branch prikk’s --ref default names, validated as a ref name at the parse boundary.
Trait Implementations§
Source§impl Clone for CurrentBranch
impl Clone for CurrentBranch
Source§impl Debug for CurrentBranch
impl Debug for CurrentBranch
impl Eq for CurrentBranch
Source§impl Hash for CurrentBranch
impl Hash for CurrentBranch
Source§impl PartialEq for CurrentBranch
impl PartialEq for CurrentBranch
impl StructuralPartialEq for CurrentBranch
Auto Trait Implementations§
impl Forget for CurrentBranch
impl Freeze for CurrentBranch
impl Move for CurrentBranch
impl RefUnwindSafe for CurrentBranch
impl Send for CurrentBranch
impl Sync for CurrentBranch
impl Unpin for CurrentBranch
impl UnsafeUnpin for CurrentBranch
impl UnwindSafe for CurrentBranch
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