pub struct FullName(_);
Expand description
Indicate that the given BString is a validate reference name or path that can be used as path on disk or written as target of a symbolic reference
Implementations
sourceimpl FullName
impl FullName
sourcepub fn to_path(&self) -> &Path
pub fn to_path(&self) -> &Path
Convert this name into the relative path, lossily, identifying the reference location relative to a repository
sourcepub fn into_inner(self) -> BString
pub fn into_inner(self) -> BString
Dissolve this instance and return the buffer.
sourcepub fn prefix_namespace(&mut self, namespace: &Namespace) -> &mut Self
pub fn prefix_namespace(&mut self, namespace: &Namespace) -> &mut Self
Modify ourself so that we use namespace
as prefix, if it is not yet in the namespace
sourcepub fn strip_namespace(&mut self, namespace: &Namespace) -> &mut Self
pub fn strip_namespace(&mut self, namespace: &Namespace) -> &mut Self
Strip the given namespace
off the beginning of this name, if it is in this namespace.
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.
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<'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 Ord for FullName
impl Ord for FullName
sourceimpl PartialOrd<FullName> for FullName
impl PartialOrd<FullName> for FullName
sourcefn partial_cmp(&self, other: &FullName) -> Option<Ordering>
fn partial_cmp(&self, other: &FullName) -> 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
sourceimpl<'a> TryFrom<&'a FullName> for &'a PartialNameRef
impl<'a> TryFrom<&'a FullName> for &'a PartialNameRef
impl Eq for FullName
impl StructuralEq for FullName
impl StructuralPartialEq for FullName
Auto Trait Implementations
impl RefUnwindSafe for FullName
impl Send for FullName
impl Sync for FullName
impl Unpin for FullName
impl UnwindSafe for FullName
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more