Struct git2::Refspec [−][src]
pub struct Refspec<'remote> { /* fields omitted */ }
A structure to represent a git refspec.
Refspecs are currently mainly accessed/created through a Remote
.
Methods
impl<'remote> Refspec<'remote>
[src]
impl<'remote> Refspec<'remote>
pub fn direction(&self) -> Direction
[src]
pub fn direction(&self) -> Direction
Get the refspec's direction.
pub fn dst(&self) -> Option<&str>
[src]
pub fn dst(&self) -> Option<&str>
Get the destination specifier.
If the destination is not utf-8, None is returned.
pub fn dst_bytes(&self) -> &[u8]
[src]
pub fn dst_bytes(&self) -> &[u8]
Get the destination specifier, in bytes.
pub fn dst_matches(&self, refname: &str) -> bool
[src]
pub fn dst_matches(&self, refname: &str) -> bool
Check if a refspec's destination descriptor matches a reference
pub fn src(&self) -> Option<&str>
[src]
pub fn src(&self) -> Option<&str>
Get the source specifier.
If the source is not utf-8, None is returned.
pub fn src_bytes(&self) -> &[u8]
[src]
pub fn src_bytes(&self) -> &[u8]
Get the source specifier, in bytes.
pub fn src_matches(&self, refname: &str) -> bool
[src]
pub fn src_matches(&self, refname: &str) -> bool
Check if a refspec's source descriptor matches a reference
pub fn is_force(&self) -> bool
[src]
pub fn is_force(&self) -> bool
Get the force update setting.
pub fn str(&self) -> Option<&str>
[src]
pub fn str(&self) -> Option<&str>
Get the refspec's string.
Returns None if the string is not valid utf8.
pub fn bytes(&self) -> &[u8]
[src]
pub fn bytes(&self) -> &[u8]
Get the refspec's string as a byte array