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.