Enum git_repository::remote::fetch::SpecIndex
source · pub enum SpecIndex {
ExplicitInRemote(usize),
Implicit(usize),
}
Available on crate features
blocking-network-client
or async-network-client
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 PartialEq<SpecIndex> for SpecIndex
impl PartialEq<SpecIndex> for SpecIndex
source§impl PartialOrd<SpecIndex> for SpecIndex
impl PartialOrd<SpecIndex> for SpecIndex
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for SpecIndex
impl Eq for SpecIndex
impl StructuralEq for SpecIndex
impl StructuralPartialEq for SpecIndex
Auto Trait Implementations§
impl RefUnwindSafe for SpecIndex
impl Send for SpecIndex
impl Sync for SpecIndex
impl Unpin for SpecIndex
impl UnwindSafe for SpecIndex
Blanket Implementations§
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more