[][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>

impl<'remote> Unpin for Refspec<'remote>

impl<'remote> UnwindSafe for Refspec<'remote>

impl<'remote> RefUnwindSafe for Refspec<'remote>

Blanket Implementations

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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