/// Replace this recipe with a new one, retaining queries that exist in both. Any queries only
/// contained in `new` (but not in `self`) will be added; any contained in `self`, but not in
/// `new` will be removed.
/// Consumes `self` and returns a replacement recipe.
Replace this recipe with a new one, retaining queries that exist in both.
Replace this recipe with a new one retaining queries that exist in both .
pub(super) fn replace(mut self, mut new: Recipe) -> Result<Recipe, String> {
        // generate replacement recipe with correct version and lineage
        new.version = self.version + 1;
        // retain the old incorporator but move it to the new recipe
        let prior_inc = self.inc.take();
        // retain security configuration
        new.security_config = self.security_config.take();
        // retain the old recipe for future reference
        new.prior = Some(Box::new(self));
        // retain the previous `SqlIncorporator` state
        new.inc = prior_inc;
        // return new recipe as replacement for self
        Ok(new)
    }
pub ( super ) fn replace ( mut self , mut new : Recipe ) -> Result < Recipe , String > { // generate replacement recipe with correct version and lineage new . version = self . version + 1 ; // retain the old incorporator but move it to the new recipe let prior_inc = self . inc . take ( ) ; // retain security configuration new . security_config = self . security_config . take ( ) ; // retain the old recipe for future reference new . prior = Some ( Box :: new ( self ) ) ; // retain the previous `SqlIncorporator` state new . inc = prior_inc ; // return new recipe as replacement for self Ok ( new ) }
Replace this recipe with a new one, retaining queries that exist in both.
Replace this recipe with a new one retaining queries that exist in both .
mut self
new
Recipe