pub fn apply_to_targets<PT: ProtocolTypes>(
trace: &mut Trace<PT>,
targets: &[TracePath],
new_term: &Term<PT>,
representative: &Term<PT>,
with_bit: bool,
constraints: &TermConstraints,
) -> MutationResultExpand description
Replace the term at each of targets (each currently structurally equal to representative) by
new_term, enforcing the result-size caps (constraints.max_result_{term,trace}_size) and,
when with_bit is set, the per-term payload budget
(constraints.threshold_max_payloads_per_term). If applying to all targets would exceed a cap,
the mutation is rejected wholesale (returns [MutationResult::Skipped]) so the “replace all
equal occurrences” atomicity is preserved. See replacement_within_caps and
payloads_within_caps.
with_bit mirrors whether bit-level mutations are enabled: when they are not, no term carries a
payload, so the whole payload accounting is skipped without even walking new_term.