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_partial(&self) -> PartialNameRef<'_>
pub fn to_partial(&self) -> PartialNameRef<'_>
Interpret this fully qualified reference name as partial name.
sourcepub fn to_ref(&self) -> FullNameRef<'_>
pub fn to_ref(&self) -> FullNameRef<'_>
Interpret this fully qualified reference as shared full name
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<'a> From<FullNameRef<'a>> for FullName
impl<'a> From<FullNameRef<'a>> for FullName
sourcefn from(value: FullNameRef<'a>) -> Self
fn from(value: FullNameRef<'a>) -> 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
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more