pub struct Refspec<'remote> { /* private fields */ }
Expand description
A structure to represent a git refspec.
Refspecs are currently mainly accessed/created through a Remote
.
Implementations§
source§impl<'remote> Refspec<'remote>
impl<'remote> Refspec<'remote>
sourcepub fn dst(&self) -> Option<&str>
pub fn dst(&self) -> Option<&str>
Get the destination specifier.
If the destination is not utf-8, None is returned.
sourcepub fn dst_matches(&self, refname: &str) -> bool
pub fn dst_matches(&self, refname: &str) -> bool
Check if a refspec’s destination descriptor matches a reference
sourcepub fn src(&self) -> Option<&str>
pub fn src(&self) -> Option<&str>
Get the source specifier.
If the source is not utf-8, None is returned.
sourcepub fn src_matches(&self, refname: &str) -> bool
pub fn src_matches(&self, refname: &str) -> bool
Check if a refspec’s source descriptor matches a reference
sourcepub fn str(&self) -> Option<&str>
pub fn str(&self) -> Option<&str>
Get the refspec’s string.
Returns None if the string is not valid utf8.
Auto Trait Implementations§
impl<'remote> RefUnwindSafe for Refspec<'remote>
impl<'remote> !Send for Refspec<'remote>
impl<'remote> !Sync for Refspec<'remote>
impl<'remote> Unpin for Refspec<'remote>
impl<'remote> UnwindSafe for Refspec<'remote>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more