Struct git_ref::FullNameRef
source · [−]#[repr(transparent)]pub struct FullNameRef(_);
Expand description
A validated and potentially partial reference name - it can safely be used for common operations.
Implementations
sourceimpl FullNameRef
impl FullNameRef
sourcepub fn as_partial_name(&self) -> &PartialNameRef
pub fn as_partial_name(&self) -> &PartialNameRef
Interpret this fully qualified reference name as partial name.
sourcepub fn to_path(&self) -> &Path
pub fn to_path(&self) -> &Path
Convert this name into the relative path identifying the reference location.
sourcepub fn shorten(&self) -> &BStr
pub fn shorten(&self) -> &BStr
Strip well-known prefixes from the name and return it.
If there is no such prefix, the original name is returned.
sourcepub fn category(&self) -> Option<Category<'_>>
pub fn category(&self) -> Option<Category<'_>>
Classify this name, or return None
if it’s unclassified.
sourcepub fn category_and_short_name(&self) -> Option<(Category<'_>, &BStr)>
pub fn category_and_short_name(&self) -> Option<(Category<'_>, &BStr)>
Classify this name, or return None
if it’s unclassified. If Some
,
the shortened name is returned as well.
sourceimpl FullNameRef
impl FullNameRef
Trait Implementations
sourceimpl AsRef<FullNameRef> for FullName
impl AsRef<FullNameRef> for FullName
sourcefn as_ref(&self) -> &FullNameRef
fn as_ref(&self) -> &FullNameRef
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Borrow<FullNameRef> for FullName
impl Borrow<FullNameRef> for FullName
sourcefn borrow(&self) -> &FullNameRef
fn borrow(&self) -> &FullNameRef
Immutably borrows from an owned value. Read more
sourceimpl Debug for FullNameRef
impl Debug for FullNameRef
sourceimpl<'a> From<&'a FullNameRef> for &'a BStr
impl<'a> From<&'a FullNameRef> for &'a BStr
sourcefn from(name: &'a FullNameRef) -> Self
fn from(name: &'a FullNameRef) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<&'a FullNameRef> for &'a PartialNameRef
impl<'a> From<&'a FullNameRef> for &'a PartialNameRef
sourcefn from(v: &'a FullNameRef) -> Self
fn from(v: &'a FullNameRef) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<&'a FullNameRef> for FullName
impl<'a> From<&'a FullNameRef> for FullName
sourcefn from(value: &'a FullNameRef) -> Self
fn from(value: &'a FullNameRef) -> Self
Converts to this type from the input type.
sourceimpl Hash for FullNameRef
impl Hash for FullNameRef
sourceimpl Ord for FullNameRef
impl Ord for FullNameRef
sourceimpl PartialEq<FullNameRef> for FullNameRef
impl PartialEq<FullNameRef> for FullNameRef
sourcefn eq(&self, other: &FullNameRef) -> bool
fn eq(&self, other: &FullNameRef) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl PartialOrd<FullNameRef> for FullNameRef
impl PartialOrd<FullNameRef> for FullNameRef
sourcefn partial_cmp(&self, other: &FullNameRef) -> Option<Ordering>
fn partial_cmp(&self, other: &FullNameRef) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more