pub struct GitRefName { /* private fields */ }Expand description
A validated ref name.
Implementations§
Source§impl GitRefName
impl GitRefName
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, GitRefParseError>
pub fn new(value: impl AsRef<str>) -> Result<Self, GitRefParseError>
Creates a ref name from text.
§Errors
Returns GitRefParseError when the name is empty or uses rejected syntax.
Sourcepub const fn kind(&self) -> GitRefKind
pub const fn kind(&self) -> GitRefKind
Returns the broad ref kind.
Trait Implementations§
Source§impl AsRef<str> for GitRefName
impl AsRef<str> for GitRefName
Source§impl Clone for GitRefName
impl Clone for GitRefName
Source§fn clone(&self) -> GitRefName
fn clone(&self) -> GitRefName
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 moreSource§impl Debug for GitRefName
impl Debug for GitRefName
Source§impl Display for GitRefName
impl Display for GitRefName
Source§impl FromStr for GitRefName
impl FromStr for GitRefName
Source§impl Hash for GitRefName
impl Hash for GitRefName
Source§impl Ord for GitRefName
impl Ord for GitRefName
Source§fn cmp(&self, other: &GitRefName) -> Ordering
fn cmp(&self, other: &GitRefName) -> Ordering
1.21.0 · 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 GitRefName
impl PartialEq for GitRefName
Source§impl PartialOrd for GitRefName
impl PartialOrd for GitRefName
Source§impl TryFrom<&str> for GitRefName
impl TryFrom<&str> for GitRefName
impl Eq for GitRefName
impl StructuralPartialEq for GitRefName
Auto Trait Implementations§
impl Freeze for GitRefName
impl RefUnwindSafe for GitRefName
impl Send for GitRefName
impl Sync for GitRefName
impl Unpin for GitRefName
impl UnsafeUnpin for GitRefName
impl UnwindSafe for GitRefName
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