pub struct VersionTagName(/* private fields */);Expand description
A version-like tag name, such as v1.2.3.
Implementations§
Source§impl VersionTagName
impl VersionTagName
Sourcepub fn new(value: impl AsRef<str>) -> Result<VersionTagName, GitTagNameError>
pub fn new(value: impl AsRef<str>) -> Result<VersionTagName, GitTagNameError>
Creates a version-like tag name.
§Errors
Returns GitTagNameError when the tag is invalid or not version-like.
Trait Implementations§
Source§impl Clone for VersionTagName
impl Clone for VersionTagName
Source§fn clone(&self) -> VersionTagName
fn clone(&self) -> VersionTagName
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 VersionTagName
impl Debug for VersionTagName
Source§impl Display for VersionTagName
impl Display for VersionTagName
Source§impl FromStr for VersionTagName
impl FromStr for VersionTagName
Source§type Err = GitTagNameError
type Err = GitTagNameError
The associated error which can be returned from parsing.
Source§fn from_str(
value: &str,
) -> Result<VersionTagName, <VersionTagName as FromStr>::Err>
fn from_str( value: &str, ) -> Result<VersionTagName, <VersionTagName as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for VersionTagName
impl Hash for VersionTagName
Source§impl Ord for VersionTagName
impl Ord for VersionTagName
Source§fn cmp(&self, other: &VersionTagName) -> Ordering
fn cmp(&self, other: &VersionTagName) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for VersionTagName
impl PartialEq for VersionTagName
Source§fn eq(&self, other: &VersionTagName) -> bool
fn eq(&self, other: &VersionTagName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for VersionTagName
impl PartialOrd for VersionTagName
impl Eq for VersionTagName
impl StructuralPartialEq for VersionTagName
Auto Trait Implementations§
impl Freeze for VersionTagName
impl RefUnwindSafe for VersionTagName
impl Send for VersionTagName
impl Sync for VersionTagName
impl Unpin for VersionTagName
impl UnsafeUnpin for VersionTagName
impl UnwindSafe for VersionTagName
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