pub fn maybe_apply_mutation_internal(&mut self, mutations: Vec<RegistryMutation>) {
        println!(
            "{}Received a mutate call containing a list of {} mutations",
            LOG_PREFIX,
            mutations.len()
        );

        let errors = self.verify_mutation_type(mutations.as_slice());
        if !errors.is_empty() {
            panic!(
                "{}Transaction rejected because of the following errors: [{}].",
                LOG_PREFIX,
                errors
                    .iter()
                    .map(|e| format!("{}", e))
                    .collect::<Vec::<String>>()
                    .join(", ")
            );
        }

        self.check_global_invariants(mutations.as_slice());
        self.apply_mutations(mutations);
    }
/// Checks that invariants hold after applying mutations
Checks that invariants hold after applying mutations
Checks that invariants hold after applying mutations
pub fn maybe_apply_mutation_internal(&mut self, mutations: Vec<RegistryMutation>) {
        println!(
            "{}Received a mutate call containing a list of {} mutations",
            LOG_PREFIX,
            mutations.len()
        );
        let errors = self.verify_mutation_type(mutations.as_slice());
        if !errors.is_empty() {
            panic!(
                "{}Transaction rejected because of the following errors: [{}].",
                LOG_PREFIX,
                errors
                    .iter()
                    .map(|e| format!("{}", e))
                    .collect::<Vec::<String>>()
                    .join(", ")
            );
        }
        self.check_global_invariants(mutations.as_slice());
        self.apply_mutations(mutations);
    }
pub fn maybe_apply_mutation_internal ( & mut self , mutations : Vec < RegistryMutation > ) { println ! ( " " LOG_PREFIX mutations len ( ) ) ; let errors = self . verify_mutation_type ( mutations . as_slice ( ) ) ; if ! errors . is_empty ( ) { panic ! ( " " LOG_PREFIX errors iter ( ) map ( e format ( " " e ) ) collect Vec String ( ) join ( " " ) ) ; } self . check_global_invariants ( mutations . as_slice ( ) ) ; self . apply_mutations ( mutations ) ; }
Checks that invariants hold after applying mutations
Checks that invariants hold after applying mutations
&mut self
mutations
Vec<RegistryMutation>
&mut self
mutations
Vec<RegistryMutation>