[][src]Struct git2::Refspec

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]

pub fn direction(&self) -> Direction
[src]

Get the refspec's direction.

pub fn dst(&self) -> Option<&str>
[src]

Get the destination specifier.

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

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

Get the destination specifier, in bytes.

pub fn dst_matches(&self, refname: &str) -> bool
[src]

Check if a refspec's destination descriptor matches a reference

pub fn src(&self) -> Option<&str>
[src]

Get the source specifier.

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

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

Get the source specifier, in bytes.

pub fn src_matches(&self, refname: &str) -> bool
[src]

Check if a refspec's source descriptor matches a reference

pub fn is_force(&self) -> bool
[src]

Get the force update setting.

pub fn str(&self) -> Option<&str>
[src]

Get the refspec's string.

Returns None if the string is not valid utf8.

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

Get the refspec's string as a byte array

Auto Trait Implementations

impl<'remote> !Send for Refspec<'remote>

impl<'remote> !Sync for Refspec<'remote>

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]