pub struct GitTagName(/* private fields */);Expand description
A validated tag name.
Implementations§
Source§impl GitTagName
impl GitTagName
Sourcepub fn new(value: impl AsRef<str>) -> Result<GitTagName, GitTagNameError>
pub fn new(value: impl AsRef<str>) -> Result<GitTagName, GitTagNameError>
Creates a tag name from text.
§Errors
Returns GitTagNameError when the tag name is empty or invalid.
Trait Implementations§
Source§impl AsRef<str> for GitTagName
impl AsRef<str> for GitTagName
Source§impl Clone for GitTagName
impl Clone for GitTagName
Source§fn clone(&self) -> GitTagName
fn clone(&self) -> GitTagName
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 GitTagName
impl Debug for GitTagName
Source§impl Display for GitTagName
impl Display for GitTagName
Source§impl FromStr for GitTagName
impl FromStr for GitTagName
Source§type Err = GitTagNameError
type Err = GitTagNameError
The associated error which can be returned from parsing.
Source§fn from_str(value: &str) -> Result<GitTagName, <GitTagName as FromStr>::Err>
fn from_str(value: &str) -> Result<GitTagName, <GitTagName as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for GitTagName
impl Hash for GitTagName
Source§impl Ord for GitTagName
impl Ord for GitTagName
Source§fn cmp(&self, other: &GitTagName) -> Ordering
fn cmp(&self, other: &GitTagName) -> 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 GitTagName
impl PartialEq for GitTagName
Source§fn eq(&self, other: &GitTagName) -> bool
fn eq(&self, other: &GitTagName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for GitTagName
impl PartialOrd for GitTagName
Source§impl TryFrom<&str> for GitTagName
impl TryFrom<&str> for GitTagName
Source§type Error = GitTagNameError
type Error = GitTagNameError
The type returned in the event of a conversion error.
Source§fn try_from(
value: &str,
) -> Result<GitTagName, <GitTagName as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<GitTagName, <GitTagName as TryFrom<&str>>::Error>
Performs the conversion.
impl Eq for GitTagName
impl StructuralPartialEq for GitTagName
Auto Trait Implementations§
impl Freeze for GitTagName
impl RefUnwindSafe for GitTagName
impl Send for GitTagName
impl Sync for GitTagName
impl Unpin for GitTagName
impl UnsafeUnpin for GitTagName
impl UnwindSafe for GitTagName
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