pub struct Refspec<'remote> { /* private fields */ }Expand description
A structure to represent a git refspec.
Refspecs are currently mainly accessed/created through a Remote.
Implementations§
Source§impl<'remote> Refspec<'remote>
impl<'remote> Refspec<'remote>
Sourcepub fn dst_matches(&self, refname: &str) -> bool
pub fn dst_matches(&self, refname: &str) -> bool
Check if a refspec’s destination descriptor matches a reference
Sourcepub fn src_matches(&self, refname: &str) -> bool
pub fn src_matches(&self, refname: &str) -> bool
Check if a refspec’s source descriptor matches a reference
Trait Implementations§
Source§impl<'remote> Binding for Refspec<'remote>
impl<'remote> Binding for Refspec<'remote>
Source§type Raw = *const git_refspec
type Raw = *const git_refspec
The raw type that allows you to interact with libgit2-sys.
Source§unsafe fn from_raw(raw: *const git_refspec) -> Refspec<'remote>
unsafe fn from_raw(raw: *const git_refspec) -> Refspec<'remote>
Build a git2 struct from its Binding::Raw value.
Source§fn raw(&self) -> *const git_refspec
fn raw(&self) -> *const git_refspec
Access the Binding::Raw value for a struct. Read more
Source§unsafe fn from_raw_opt<T>(raw: T) -> Option<Self>
unsafe fn from_raw_opt<T>(raw: T) -> Option<Self>
A null-handling version of Binding::from_raw. Read more
Auto Trait Implementations§
impl<'remote> Freeze for Refspec<'remote>
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> UnsafeUnpin for Refspec<'remote>
impl<'remote> UnwindSafe for Refspec<'remote>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more