pub struct ParsedRef {
pub original_ref: String,
pub normalized_for_semver: String,
pub previous_ref: String,
pub has_refs_tags_prefix: bool,
}Expand description
Outcome of normalising a ref string for semver comparison.
Fields§
§original_ref: StringThe input passed to parse_ref, verbatim.
normalized_for_semver: StringRef reduced to a shape semver::Version::parse accepts
(or an unparseable residue when the input was not a semver
tag).
previous_ref: StringForm of the input after one round of stripping. Surfaces in
Updater’s “from X to Y” status output, where the user
expects the displayed previous ref to match what they
originally pinned rather than the fully-normalised core.
true when the input carried a refs/tags/ prefix (or the
caller forced it via default_refs_tags_prefix). Callers
reattach the prefix to the newly-resolved tag to preserve
the user’s existing ref style.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParsedRef
impl RefUnwindSafe for ParsedRef
impl Send for ParsedRef
impl Sync for ParsedRef
impl Unpin for ParsedRef
impl UnsafeUnpin for ParsedRef
impl UnwindSafe for ParsedRef
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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