pub struct Outcome {
pub edits: Vec<RefEdit>,
pub updates: Vec<Update>,
}
Available on crate features
async-network-client
or blocking-network-client
only.Expand description
The outcome of the refs-update operation at the end of a fetch.
Fields§
§edits: Vec<RefEdit>
All edits that were performed to update local refs.
updates: Vec<Update>
Each update provides more information about what happened to the corresponding mapping.
Use iter_mapping_updates()
to recombine the update information with ref-edits and their
mapping.
Implementations§
source§impl Outcome
impl Outcome
sourcepub fn iter_mapping_updates<'a, 'b>(
&self,
mappings: &'a [Mapping],
refspecs: &'b [RefSpec],
extra_refspecs: &'b [RefSpec]
) -> impl Iterator<Item = (&Update, &'a Mapping, Option<&'b RefSpec>, Option<&RefEdit>)>
pub fn iter_mapping_updates<'a, 'b>( &self, mappings: &'a [Mapping], refspecs: &'b [RefSpec], extra_refspecs: &'b [RefSpec] ) -> impl Iterator<Item = (&Update, &'a Mapping, Option<&'b RefSpec>, Option<&RefEdit>)>
Produce an iterator over all information used to produce the this outcome, ref-update by ref-update, using the mappings
used when producing the ref update.
Note that mappings that don’t have a corresponding entry in refspecs
these will be None
even though that should never be the case.
This can happen if the refspecs
passed in aren’t the respecs used to create the mapping
, and it’s up to the caller to sort it out.