Struct git_refspec::RefSpecRef
source · [−]pub struct RefSpecRef<'a> { /* private fields */ }
Expand description
A refspec with references to the memory it was parsed from.
Implementations
sourceimpl RefSpecRef<'_>
impl RefSpecRef<'_>
Access
sourcepub fn source(&self) -> Option<&BStr>
pub fn source(&self) -> Option<&BStr>
Return the left-hand side of the spec, typically the source. It takes many different forms so don’t rely on this being a ref name.
It’s not present in case of deletions.
sourcepub fn destination(&self) -> Option<&BStr>
pub fn destination(&self) -> Option<&BStr>
Return the right-hand side of the spec, typically the destination. It takes many different forms so don’t rely on this being a ref name.
It’s not present in case of source-only specs.
sourcepub fn remote(&self) -> Option<&BStr>
pub fn remote(&self) -> Option<&BStr>
Always returns the remote side, whose actual side in the refspec depends on how it was parsed.
sourcepub fn local(&self) -> Option<&BStr>
pub fn local(&self) -> Option<&BStr>
Always returns the local side, whose actual side in the refspec depends on how it was parsed.
sourcepub fn instruction(&self) -> Instruction<'_>
pub fn instruction(&self) -> Instruction<'_>
Transform the state of the refspec into an instruction making clear what to do with it.
sourceimpl RefSpecRef<'_>
impl RefSpecRef<'_>
Conversion
sourceimpl RefSpecRef<'_>
impl RefSpecRef<'_>
Trait Implementations
sourceimpl<'a> Clone for RefSpecRef<'a>
impl<'a> Clone for RefSpecRef<'a>
sourcefn clone(&self) -> RefSpecRef<'a>
fn clone(&self) -> RefSpecRef<'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 moresourceimpl<'a> Debug for RefSpecRef<'a>
impl<'a> Debug for RefSpecRef<'a>
sourceimpl From<RefSpecRef<'_>> for RefSpec
impl From<RefSpecRef<'_>> for RefSpec
sourcefn from(v: RefSpecRef<'_>) -> Self
fn from(v: RefSpecRef<'_>) -> Self
Converts to this type from the input type.
sourceimpl Hash for RefSpecRef<'_>
impl Hash for RefSpecRef<'_>
sourceimpl Ord for RefSpecRef<'_>
impl Ord for RefSpecRef<'_>
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<RefSpecRef<'_>> for RefSpecRef<'_>
impl PartialEq<RefSpecRef<'_>> for RefSpecRef<'_>
sourceimpl PartialOrd<RefSpecRef<'_>> for RefSpecRef<'_>
impl PartialOrd<RefSpecRef<'_>> for RefSpecRef<'_>
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
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 moreimpl<'a> Copy for RefSpecRef<'a>
impl<'a> Eq for RefSpecRef<'a>
impl<'a> StructuralEq for RefSpecRef<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for RefSpecRef<'a>
impl<'a> Send for RefSpecRef<'a>
impl<'a> Sync for RefSpecRef<'a>
impl<'a> Unpin for RefSpecRef<'a>
impl<'a> UnwindSafe for RefSpecRef<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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