Trait gix_ref::transaction::RefEditsExt
source · pub trait RefEditsExt<T>{
// Required methods
fn assure_one_name_has_one_edit(&self) -> Result<(), BString>;
fn extend_with_splits_of_symbolic_refs(
&mut self,
find: &mut dyn FnMut(&PartialNameRef) -> Option<Target>,
make_entry: &mut dyn FnMut(usize, RefEdit) -> T,
) -> Result<(), Error>;
// Provided method
fn pre_process(
&mut self,
find: &mut dyn FnMut(&PartialNameRef) -> Option<Target>,
make_entry: &mut dyn FnMut(usize, RefEdit) -> T,
) -> Result<(), Error> { ... }
}
Expand description
An extension trait to perform commonly used operations on edits across different ref stores.
Required Methods§
sourcefn assure_one_name_has_one_edit(&self) -> Result<(), BString>
fn assure_one_name_has_one_edit(&self) -> Result<(), BString>
Return true if each ref name
has exactly one edit
across multiple ref edits
sourcefn extend_with_splits_of_symbolic_refs(
&mut self,
find: &mut dyn FnMut(&PartialNameRef) -> Option<Target>,
make_entry: &mut dyn FnMut(usize, RefEdit) -> T,
) -> Result<(), Error>
fn extend_with_splits_of_symbolic_refs( &mut self, find: &mut dyn FnMut(&PartialNameRef) -> Option<Target>, make_entry: &mut dyn FnMut(usize, RefEdit) -> T, ) -> Result<(), Error>
Split all symbolic refs into updates for the symbolic ref as well as all their referents if the deref
flag is enabled.
Note no action is performed if deref isn’t specified.