Struct git2::Refspec [−][src]
A structure to represent a git refspec.
Refspecs are currently mainly accessed/created through a Remote
.
Implementations
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> RefUnwindSafe for Refspec<'remote>
impl<'remote> !Send for Refspec<'remote>
impl<'remote> !Sync for Refspec<'remote>
impl<'remote> Unpin for Refspec<'remote>
impl<'remote> UnwindSafe for Refspec<'remote>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,