Struct GitTagName
pub struct GitTagName(/* private fields */);Expand description
A validated tag name.
Implementations§
§impl GitTagName
impl GitTagName
pub 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§
§impl AsRef<str> for GitTagName
impl AsRef<str> for GitTagName
§impl Clone for GitTagName
impl Clone for GitTagName
§fn clone(&self) -> GitTagName
fn clone(&self) -> GitTagName
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for GitTagName
impl Debug for GitTagName
§impl Display for GitTagName
impl Display for GitTagName
§impl FromStr for GitTagName
impl FromStr for GitTagName
§type Err = GitTagNameError
type Err = GitTagNameError
The associated error which can be returned from parsing.
§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 more§impl Hash for GitTagName
impl Hash for GitTagName
§impl Ord for GitTagName
impl Ord for GitTagName
§impl PartialEq for GitTagName
impl PartialEq for GitTagName
§impl PartialOrd for GitTagName
impl PartialOrd for GitTagName
§impl TryFrom<&str> for GitTagName
impl TryFrom<&str> for GitTagName
§type Error = GitTagNameError
type Error = GitTagNameError
The type returned in the event of a conversion error.
§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