Struct git_ref::FullNameRef
source · [−]pub struct FullNameRef<'a>(_);
Expand description
A validated and potentially partial reference name - it can safely be used for common operations.
Implementations
sourceimpl<'a> FullNameRef<'a>
impl<'a> FullNameRef<'a>
sourceimpl<'a> FullNameRef<'a>
impl<'a> FullNameRef<'a>
sourcepub fn to_path(self) -> &'a Path
pub fn to_path(self) -> &'a Path
Convert this name into the relative path identifying the reference location.
sourcepub fn shorten(&self) -> &'a BStr
pub fn shorten(&self) -> &'a 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> Clone for FullNameRef<'a>
impl<'a> Clone for FullNameRef<'a>
sourcefn clone(&self) -> FullNameRef<'a>
fn clone(&self) -> FullNameRef<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for FullNameRef<'a>
impl<'a> Debug for FullNameRef<'a>
sourceimpl<'a> From<FullNameRef<'a>> for &'a BStr
impl<'a> From<FullNameRef<'a>> for &'a BStr
sourcefn from(name: FullNameRef<'a>) -> Self
fn from(name: FullNameRef<'a>) -> Self
Converts to this type from the input type.
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<'a> Hash for FullNameRef<'a>
impl<'a> Hash for FullNameRef<'a>
sourceimpl<'a> Ord for FullNameRef<'a>
impl<'a> Ord for FullNameRef<'a>
sourceimpl<'a> PartialEq<FullNameRef<'a>> for FullNameRef<'a>
impl<'a> PartialEq<FullNameRef<'a>> for FullNameRef<'a>
sourcefn eq(&self, other: &FullNameRef<'a>) -> bool
fn eq(&self, other: &FullNameRef<'a>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &FullNameRef<'a>) -> bool
fn ne(&self, other: &FullNameRef<'a>) -> bool
This method tests for !=
.
sourceimpl<'a> PartialOrd<FullNameRef<'a>> for FullNameRef<'a>
impl<'a> PartialOrd<FullNameRef<'a>> for FullNameRef<'a>
sourcefn partial_cmp(&self, other: &FullNameRef<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &FullNameRef<'a>) -> 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 BStr> for FullNameRef<'a>
impl<'a> TryFrom<&'a BStr> for FullNameRef<'a>
sourceimpl<'a> TryFrom<&'a String> for FullNameRef<'a>
impl<'a> TryFrom<&'a String> for FullNameRef<'a>
sourceimpl<'a> TryFrom<&'a str> for FullNameRef<'a>
impl<'a> TryFrom<&'a str> for FullNameRef<'a>
sourceimpl<'a> TryFrom<FullNameRef<'a>> for PartialNameRef<'a>
impl<'a> TryFrom<FullNameRef<'a>> for PartialNameRef<'a>
type Error = Infallible
type Error = Infallible
The type returned in the event of a conversion error.
sourcefn try_from(v: FullNameRef<'a>) -> Result<Self, Self::Error>
fn try_from(v: FullNameRef<'a>) -> Result<Self, Self::Error>
Performs the conversion.
impl<'a> Copy for FullNameRef<'a>
impl<'a> Eq for FullNameRef<'a>
impl<'a> StructuralEq for FullNameRef<'a>
impl<'a> StructuralPartialEq for FullNameRef<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for FullNameRef<'a>
impl<'a> Send for FullNameRef<'a>
impl<'a> Sync for FullNameRef<'a>
impl<'a> Unpin for FullNameRef<'a>
impl<'a> UnwindSafe for FullNameRef<'a>
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