Skip to main content

DynamicScriptOutcome

Struct DynamicScriptOutcome 

Source
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: usize

Number of form field values that were mutated by scripts.

§js_present: bool

True when the document contains at least one JavaScript event hook.

§js_skipped: usize

Number of JavaScript scripts that were skipped (not executed).

§other_skipped: usize

Number of scripts in unsupported languages (not FormCalc, not JavaScript) skipped.

§formcalc_run: usize

Number of FormCalc scripts that ran successfully.

§formcalc_errors: usize

Number of FormCalc scripts that produced an error.

§output_quality: OutputQuality

Overall output quality after script processing.

§js_executed: usize

M3-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: usize

M3-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: usize

M3-B Phase B. Per-script time-budget exhaustions.

§js_oom: usize

M3-B Phase B. Per-document memory-budget exhaustions.

§js_host_calls: usize

M3-B Phase C. Host-binding invocations.

§js_mutations: usize

M3-B Phase C. Successful host-side field.rawValue writes.

§js_instance_writes: usize

M3-B Phase D. Successful host-side instanceManager writes.

§js_list_writes: usize

M3-B Phase D-β. Successful host-side listbox clearItems / addItem writes.

§js_binding_errors: usize

M3-B Phase C. Binding-level failures.

§js_resolve_failures: usize

M3-B Phase C. SOM resolution misses / failures.

§js_data_reads: usize

M3-B Phase D-γ. Successful DataDom reads (children / value / child-by-name).

§js_unsupported_host_calls: usize

M3-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: usize

M3-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: usize

D3 (trace-only). <variables> <script> objects collected.

§variables_data_items_collected: usize

D3 (trace-only). <variables> <text> data items collected.

§script_objects_registered: usize

D3 (trace-only). Script objects / data items whose registration bound a namespace (JS-side setVariables* returned success).

§script_objects_register_failed: usize

D3 (trace-only). Script objects / data items that did NOT register (Rust skip or JS-side eval failure). Observability only.

§script_objects_subform_scoped: usize

D3 (trace-only). Script objects collected under a nested subform scope (registered to subformVariables only — not bare-ident visible).

§som_lookups_total: usize

D4. Total SOM lookups at the host resolve boundary.

§som_lookup_successes: usize

D4. SOM lookups that resolved.

§som_lookup_failures: usize

D4. SOM lookups that returned NoMatch.

§som_lookup_ambiguous: usize

D4. Subform-script names withheld for ambiguity (fail-closed).

§som_subform_scripts_exposed: usize

D4. Subform-scoped script objects exposed to bare-identifier lookup.

§som_occur_path_refs: usize

D4 (trace-only). occur-path SOM references (classified, not resolved).

§occur_lookups_total: usize

D5. node.occur handle accesses (successes + failures).

§occur_lookup_successes: usize

D5. node.occur accesses where the node handle was live.

§occur_lookup_failures: usize

D5. node.occur accesses where the node handle was not live.

§occur_property_reads: usize

D5. Reads of an occur property (min/max/initial).

§occur_property_writes: usize

D5. Writes to an occur property (captured, not applied).

§occur_min_writes: usize

D5. Writes specifically to occur.min.

§occur_max_writes: usize

D5. Writes specifically to occur.max.

§occur_mutations_captured: usize

D5. Occur mutations captured as intent (no layout effect).

§occur_mutations_applied: usize

D5/D6. Occur mutations APPLIED to layout (D5: 0; D6: >0 under XFA_OCCUR_APPLY).

§occur_mutations_skipped: usize

D6. Captured occur mutations not applied (gate off / rollback / unsupported).

§occur_application_ambiguous: usize

D6. Captured occur mutations skipped because the target is not a repeatable container (fail-closed).

§occur_application_targets: usize

D6. Distinct nodes whose occur was applied.

§presence_retry_enabled: bool

D7. Presence retry was active (sandboxed + both flags + no rollback).

§presence_retry_candidates: usize

D7. Hidden/invisible/inactive nodes considered under occur targets.

§presence_retry_admitted: usize

D7. Nodes admitted (Hidden/Invisible -> Visible).

§presence_retry_skipped: usize

D7. Candidates skipped (e.g. Inactive, fail-closed).

§presence_retry_nodes_under_admitted: usize

D7. Total nodes under admitted subtrees (recovery breadth).

§presence_retry_text_nodes_admitted: usize

D7. 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: SkippedActivities

E-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: usize

E-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

Source§

fn clone(&self) -> DynamicScriptOutcome

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DynamicScriptOutcome

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DynamicScriptOutcome

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for DynamicScriptOutcome

Source§

impl PartialEq for DynamicScriptOutcome

Source§

fn eq(&self, other: &DynamicScriptOutcome) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for DynamicScriptOutcome

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> ParallelSend for T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(value: T, _simd: S) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V