[−][src]Struct git2::Refspec
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] |
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
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |