pub struct FullNameRef(/* private fields */);
Expand description
A validated complete and fully qualified 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.