pub enum SpecIndex {
ExplicitInRemote(usize),
Implicit(usize),
}
Available on crate feature
fetch
only.Expand description
An index into various lists of refspecs that have been used in a Mapping of remote references to local ones.
Variants§
ExplicitInRemote(usize)
An index into the refspecs of the remote that triggered a fetch operation. These refspecs are explicit and visible to the user.
Implicit(usize)
An index into the list of extra refspecs that are implicit to a particular fetch operation.
Implementations§
Source§impl SpecIndex
impl SpecIndex
Sourcepub fn get<'a>(
self,
refspecs: &'a [RefSpec],
extra_refspecs: &'a [RefSpec],
) -> Option<&'a RefSpec>
pub fn get<'a>( self, refspecs: &'a [RefSpec], extra_refspecs: &'a [RefSpec], ) -> Option<&'a RefSpec>
Depending on our index variant, get the index either from refspecs
or from extra_refspecs
for Implicit
variants.
Sourcepub fn implicit_index(self) -> Option<usize>
pub fn implicit_index(self) -> Option<usize>
If this is an Implicit
variant, return its index.
Trait Implementations§
Source§impl Ord for SpecIndex
impl Ord for SpecIndex
Source§impl PartialOrd for SpecIndex
impl PartialOrd for SpecIndex
impl Copy for SpecIndex
impl Eq for SpecIndex
impl StructuralPartialEq for SpecIndex
Auto Trait Implementations§
impl Freeze for SpecIndex
impl RefUnwindSafe for SpecIndex
impl Send for SpecIndex
impl Sync for SpecIndex
impl Unpin for SpecIndex
impl UnwindSafe for SpecIndex
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