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.