pub struct DynamicScriptOutcome {Show 56 fields
pub changes: usize,
pub js_present: bool,
pub js_skipped: usize,
pub other_skipped: usize,
pub formcalc_run: usize,
pub formcalc_errors: usize,
pub output_quality: OutputQuality,
pub js_executed: usize,
pub js_runtime_errors: usize,
pub js_timeouts: usize,
pub js_oom: usize,
pub js_host_calls: usize,
pub js_mutations: usize,
pub js_instance_writes: usize,
pub js_list_writes: usize,
pub js_binding_errors: usize,
pub js_resolve_failures: usize,
pub js_data_reads: usize,
pub js_unsupported_host_calls: usize,
pub js_probe_skips: usize,
pub variables_scripts_collected: usize,
pub variables_data_items_collected: usize,
pub script_objects_registered: usize,
pub script_objects_register_failed: usize,
pub script_objects_subform_scoped: usize,
pub som_lookups_total: usize,
pub som_lookup_successes: usize,
pub som_lookup_failures: usize,
pub som_lookup_ambiguous: usize,
pub som_subform_scripts_exposed: usize,
pub som_occur_path_refs: usize,
pub occur_lookups_total: usize,
pub occur_lookup_successes: usize,
pub occur_lookup_failures: usize,
pub occur_property_reads: usize,
pub occur_property_writes: usize,
pub occur_min_writes: usize,
pub occur_max_writes: usize,
pub occur_mutations_captured: usize,
pub occur_mutations_applied: usize,
pub occur_mutations_skipped: usize,
pub occur_application_ambiguous: usize,
pub occur_application_targets: usize,
pub presence_retry_enabled: bool,
pub presence_retry_candidates: usize,
pub presence_retry_admitted: usize,
pub presence_retry_skipped: usize,
pub presence_retry_nodes_under_admitted: usize,
pub presence_retry_text_nodes_admitted: usize,
pub script_lifecycle: Vec<ScriptLifecycleEntry>,
pub skipped_activities: SkippedActivities,
pub som_fail_log: Vec<SomFailEntry>,
pub instance_write_log: Vec<InstanceWriteEntry>,
pub presence_mutation_log: Vec<PresenceMutationEntry>,
pub form_dom_match_failures: usize,
pub form_dom_match_log: Vec<FormDomMatchEntry>,
}Expand description
Aggregate outcome of the dynamic script processing pass.
Returned by flatten_xfa_to_pdf_with_metadata
and embedded in FlattenMetadata.
Fields§
§changes: usizeNumber of form field values that were mutated by scripts.
js_present: boolTrue when the document contains at least one JavaScript event hook.
js_skipped: usizeNumber of JavaScript scripts that were skipped (not executed).
other_skipped: usizeNumber of scripts in unsupported languages (not FormCalc, not JavaScript) skipped.
formcalc_run: usizeNumber of FormCalc scripts that ran successfully.
formcalc_errors: usizeNumber of FormCalc scripts that produced an error.
output_quality: OutputQualityOverall output quality after script processing.
js_executed: usizeM3-B Phase B. Scripts that ran to completion in the sandboxed
runtime. Always 0 when mode != JsExecutionMode::SandboxedRuntime
or when the xfa-js-sandboxed feature is not compiled in.
js_runtime_errors: usizeM3-B Phase B. Sandbox errors that did not fall under timeout / OOM (parse error, throw, missing host binding in Phase B, FFI panic). The dispatch path treats these as a script skip; the parent flatten never aborts because of them (S-17 fail-open).
js_timeouts: usizeM3-B Phase B. Per-script time-budget exhaustions.
js_oom: usizeM3-B Phase B. Per-document memory-budget exhaustions.
js_host_calls: usizeM3-B Phase C. Host-binding invocations.
js_mutations: usizeM3-B Phase C. Successful host-side field.rawValue writes.
js_instance_writes: usizeM3-B Phase D. Successful host-side instanceManager writes.
js_list_writes: usizeM3-B Phase D-β. Successful host-side listbox clearItems / addItem writes.
js_binding_errors: usizeM3-B Phase C. Binding-level failures.
js_resolve_failures: usizeM3-B Phase C. SOM resolution misses / failures.
js_data_reads: usizeM3-B Phase D-γ. Successful DataDom reads (children / value / child-by-name).
js_unsupported_host_calls: usizeM3-B Phase E (XFA-JS-HOST-STUBS). Scripts touched a host capability that requires real viewer / user interaction (UI dialogs, signature, submit, openList, beep, …). The stub returned a deterministic safe default so the script kept running; this counter records how often such a touch happened so callers can distinguish “would-have-been interactive” from genuine runtime errors.
js_probe_skips: usizeM3-B Phase D-θ.2. Strict probe calls skipped because
parentIds.length == 1 && chain.length == 1 (no same-name
sibling ambiguity possible). Each skipped call saves one
resolveWithFullChainStrict host round-trip.
variables_scripts_collected: usizeD3 (trace-only). <variables> <script> objects collected.
variables_data_items_collected: usizeD3 (trace-only). <variables> <text> data items collected.
script_objects_registered: usizeD3 (trace-only). Script objects / data items whose registration
bound a namespace (JS-side setVariables* returned success).
script_objects_register_failed: usizeD3 (trace-only). Script objects / data items that did NOT register (Rust skip or JS-side eval failure). Observability only.
script_objects_subform_scoped: usizeD3 (trace-only). Script objects collected under a nested subform
scope (registered to subformVariables only — not bare-ident visible).
som_lookups_total: usizeD4. Total SOM lookups at the host resolve boundary.
som_lookup_successes: usizeD4. SOM lookups that resolved.
som_lookup_failures: usizeD4. SOM lookups that returned NoMatch.
som_lookup_ambiguous: usizeD4. Subform-script names withheld for ambiguity (fail-closed).
som_subform_scripts_exposed: usizeD4. Subform-scoped script objects exposed to bare-identifier lookup.
som_occur_path_refs: usizeD4 (trace-only). occur-path SOM references (classified, not resolved).
occur_lookups_total: usizeD5. node.occur handle accesses (successes + failures).
occur_lookup_successes: usizeD5. node.occur accesses where the node handle was live.
occur_lookup_failures: usizeD5. node.occur accesses where the node handle was not live.
occur_property_reads: usizeD5. Reads of an occur property (min/max/initial).
occur_property_writes: usizeD5. Writes to an occur property (captured, not applied).
occur_min_writes: usizeD5. Writes specifically to occur.min.
occur_max_writes: usizeD5. Writes specifically to occur.max.
occur_mutations_captured: usizeD5. Occur mutations captured as intent (no layout effect).
occur_mutations_applied: usizeD5/D6. Occur mutations APPLIED to layout (D5: 0; D6: >0 under XFA_OCCUR_APPLY).
occur_mutations_skipped: usizeD6. Captured occur mutations not applied (gate off / rollback / unsupported).
occur_application_ambiguous: usizeD6. Captured occur mutations skipped because the target is not a repeatable container (fail-closed).
occur_application_targets: usizeD6. Distinct nodes whose occur was applied.
presence_retry_enabled: boolD7. Presence retry was active (sandboxed + both flags + no rollback).
presence_retry_candidates: usizeD7. Hidden/invisible/inactive nodes considered under occur targets.
presence_retry_admitted: usizeD7. Nodes admitted (Hidden/Invisible -> Visible).
presence_retry_skipped: usizeD7. Candidates skipped (e.g. Inactive, fail-closed).
presence_retry_nodes_under_admitted: usizeD7. Total nodes under admitted subtrees (recovery breadth).
presence_retry_text_nodes_admitted: usizeD7. Field/draw nodes under admitted subtrees.
script_lifecycle: Vec<ScriptLifecycleEntry>E-1 (XFA_FLATTEN_TRACE). Per-script lifecycle entries (capped at 500). Each entry records the script index, host node id/name, activity, language, and outcome (executed|skipped_activity|skipped_mode|error|timeout).
skipped_activities: SkippedActivitiesE-6 (XFA_FLATTEN_TRACE). Per-activity tally of JS scripts that were skipped (not routed through the sandbox).
som_fail_log: Vec<SomFailEntry>E-2 (XFA_RUNTIME_DIAG). SOM resolution misses logged at the host-binding boundary. Capped at 200 entries.
instance_write_log: Vec<InstanceWriteEntry>E-3 (XFA_RUNTIME_DIAG). Per-write instanceManager mutation log (capped at 200).
presence_mutation_log: Vec<PresenceMutationEntry>E-4 (XFA_RUNTIME_DIAG). Presence mutations observed during FormCalc
script execution (capped at 200). JS-side presence writes go through the
host binding; FormCalc goes through set_presence in dynamic.rs — this
captures the FormCalc path.
form_dom_match_failures: usizeE-5 (XFA_FLATTEN_TRACE). Number of named subforms hidden by
apply_form_dom_presence because they had no matching form-DOM entry.
form_dom_match_log: Vec<FormDomMatchEntry>E-5 (XFA_RUNTIME_DIAG). Per-suppression entries from
apply_form_dom_presence (capped at 200).
Trait Implementations§
Source§impl Clone for DynamicScriptOutcome
impl Clone for DynamicScriptOutcome
Source§fn clone(&self) -> DynamicScriptOutcome
fn clone(&self) -> DynamicScriptOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DynamicScriptOutcome
impl Debug for DynamicScriptOutcome
Source§impl Default for DynamicScriptOutcome
impl Default for DynamicScriptOutcome
Source§impl PartialEq for DynamicScriptOutcome
impl PartialEq for DynamicScriptOutcome
Source§fn eq(&self, other: &DynamicScriptOutcome) -> bool
fn eq(&self, other: &DynamicScriptOutcome) -> bool
self and other values to be equal, and is used by ==.impl Eq for DynamicScriptOutcome
impl StructuralPartialEq for DynamicScriptOutcome
Auto Trait Implementations§
impl Freeze for DynamicScriptOutcome
impl RefUnwindSafe for DynamicScriptOutcome
impl Send for DynamicScriptOutcome
impl Sync for DynamicScriptOutcome
impl Unpin for DynamicScriptOutcome
impl UnsafeUnpin for DynamicScriptOutcome
impl UnwindSafe for DynamicScriptOutcome
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().