Struct git2::Refspec [] [src]

pub struct Refspec<'remote> {
    // some fields omitted
}

A structure to represent a git refspec.

Refspecs are currently mainly accessed/created through a Remote.

Methods

impl<'remote> Refspec<'remote>
[src]

fn direction(&self) -> Direction

Get the refspec's direction.

fn dst(&self) -> Option<&str>

Get the destination specifier.

If the destination is not utf-8, None is returned.

fn dst_bytes(&self) -> &[u8]

Get the destination specifier, in bytes.

fn dst_matches(&self, refname: &str) -> bool

Check if a refspec's destination descriptor matches a reference

fn src(&self) -> Option<&str>

Get the source specifier.

If the source is not utf-8, None is returned.

fn src_bytes(&self) -> &[u8]

Get the source specifier, in bytes.

fn src_matches(&self, refname: &str) -> bool

Check if a refspec's source descriptor matches a reference

fn is_force(&self) -> bool

Get the force update setting.

fn str(&self) -> Option<&str>

Get the refspec's string.

Returns None if the string is not valid utf8.

fn bytes(&self) -> &[u8]

Get the refspec's string as a byte array