Struct gix_ref::FullNameRef
source · pub struct FullNameRef(/* private fields */);
Expand description
A validated complete and fully qualified referenced reference name, safe to use for all operations.
Implementations§
source§impl 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.
Trait Implementations§
source§impl AsRef<FullNameRef> for FullName
impl AsRef<FullNameRef> for FullName
source§fn as_ref(&self) -> &FullNameRef
fn as_ref(&self) -> &FullNameRef
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Borrow<FullNameRef> for FullName
impl Borrow<FullNameRef> for FullName
source§fn borrow(&self) -> &FullNameRef
fn borrow(&self) -> &FullNameRef
Immutably borrows from an owned value. Read more
source§impl Debug for FullNameRef
impl Debug for FullNameRef
source§impl<'a> From<&'a FullNameRef> for &'a BStr
impl<'a> From<&'a FullNameRef> for &'a BStr
source§fn from(name: &'a FullNameRef) -> Self
fn from(name: &'a FullNameRef) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a FullNameRef> for &'a PartialNameRef
impl<'a> From<&'a FullNameRef> for &'a PartialNameRef
source§fn from(v: &'a FullNameRef) -> Self
fn from(v: &'a FullNameRef) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a FullNameRef> for FullName
impl<'a> From<&'a FullNameRef> for FullName
source§fn from(value: &'a FullNameRef) -> Self
fn from(value: &'a FullNameRef) -> Self
Converts to this type from the input type.
source§impl Hash for FullNameRef
impl Hash for FullNameRef
source§impl Ord for FullNameRef
impl Ord for FullNameRef
source§impl PartialEq for FullNameRef
impl PartialEq for FullNameRef
source§fn 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 ==
.source§impl PartialOrd for FullNameRef
impl PartialOrd for FullNameRef
source§fn partial_cmp(&self, other: &FullNameRef) -> Option<Ordering>
fn partial_cmp(&self, other: &FullNameRef) -> Option<Ordering>
1.0.0 · source§fn 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