pub struct NullRuntime { /* private fields */ }Expand description
Stub runtime that refuses every script call.
Implementations§
Source§impl NullRuntime
impl NullRuntime
Trait Implementations§
Source§impl Debug for NullRuntime
impl Debug for NullRuntime
Source§impl Default for NullRuntime
impl Default for NullRuntime
Source§fn default() -> NullRuntime
fn default() -> NullRuntime
Returns the “default value” for a type. Read more
Source§impl XfaJsRuntime for NullRuntime
impl XfaJsRuntime for NullRuntime
Source§fn reset_for_new_document(&mut self) -> Result<(), SandboxError>
fn reset_for_new_document(&mut self) -> Result<(), SandboxError>
Reset per-document state (memory budget, instruction counter,
any cached compiled scripts). Called once per flatten.
Source§fn execute_script(
&mut self,
_activity: Option<&str>,
_body: &str,
) -> Result<RuntimeOutcome, SandboxError>
fn execute_script( &mut self, _activity: Option<&str>, _body: &str, ) -> Result<RuntimeOutcome, SandboxError>
Execute one script body inside the sandbox. Read more
Source§fn take_metadata(&mut self) -> RuntimeMetadata
fn take_metadata(&mut self) -> RuntimeMetadata
Take the cumulative metadata since the last
take_metadata
call (or since reset_for_new_document, whichever was later).Source§fn set_form_handle(
&mut self,
_form: *mut FormTree,
_root_id: FormNodeId,
) -> Result<(), SandboxError>
fn set_form_handle( &mut self, _form: *mut FormTree, _root_id: FormNodeId, ) -> Result<(), SandboxError>
Phase C: install the
FormTree the runtime should resolve paths
against and mutate. The dispatch path owns the mutable borrow and clears
the handle before returning.Source§fn set_data_handle(&mut self, _dom: *const DataDom)
fn set_data_handle(&mut self, _dom: *const DataDom)
Phase D-γ: install a read-only view of the
DataDom for the current
document. Called once per document after set_form_handle, before any
scripts run. Default: no-op (backends without DataDom support ignore it). Read moreSource§fn set_declared_subform_names(&mut self, _names: HashSet<String>)
fn set_declared_subform_names(&mut self, _names: HashSet<String>)
BE-1 tranche #1 (benign zero-instance SOM): install the set of
template-declared container names (
subform/subformSet/exclGroup/
area) for the current document. Backends that resolve implicit SOM
identifiers use it to return a benign empty-node façade for a
declared-but-absent reference instead of undefined (Adobe semantics),
so guarded scripts (if (!Sub.Child.isNull) {...} else {...}) run their
else branch instead of throwing. Like set_data_handle, the caller
installs this before script execution. Default: no-op (the static
NullRuntime ignores it, so the default/non-sandboxed path is
unaffected and stays byte-identical).Source§fn reset_per_script(
&mut self,
_current_id: FormNodeId,
_activity: Option<&str>,
) -> Result<(), SandboxError>
fn reset_per_script( &mut self, _current_id: FormNodeId, _activity: Option<&str>, ) -> Result<(), SandboxError>
Phase C: reset per-script host counters and install the current script
context node / activity. Backends without host bindings ignore it.
Source§fn set_static_page_count(
&mut self,
_page_count: u32,
) -> Result<(), SandboxError>
fn set_static_page_count( &mut self, _page_count: u32, ) -> Result<(), SandboxError>
Phase C page-count foundation. The current flatten order runs scripts
before layout, so callers normally leave this at 0.
Source§fn set_presave_gate(&mut self, _enabled: bool)
fn set_presave_gate(&mut self, _enabled: bool)
D1.B gated allow. Inform the runtime whether the
XFA_PRESAVE_DURING_FLATTEN=1 opt-in is active for the current
flatten. The dispatch path computes this once per document via
presave_during_flatten_enabled and forwards it here so the host
binding layer can mirror the dispatch decision (defence-in-depth). Read moreSource§fn take_occur_mutations(&mut self) -> Vec<(usize, String, i64)>
fn take_occur_mutations(&mut self) -> Vec<(usize, String, i64)>
D6: drain captured
occur.min/occur.max write intents
(node_index, prop, value) recorded during the script pass. The
dispatch path applies them (only when XFA_OCCUR_APPLY=1) after the
rollback decision. Default: none (non-sandboxed runtimes capture nothing).Source§fn take_diag_logs(&mut self) -> RuntimeDiagLogs
fn take_diag_logs(&mut self) -> RuntimeDiagLogs
Epic A E-2/E-3: drain verbose per-entry diagnostic logs. Only
populated when
XFA_RUNTIME_DIAG=1 is set at the host call sites.
Default impl returns empty logs (NullRuntime, non-sandboxed paths).Auto Trait Implementations§
impl Freeze for NullRuntime
impl RefUnwindSafe for NullRuntime
impl Send for NullRuntime
impl Sync for NullRuntime
impl Unpin for NullRuntime
impl UnsafeUnpin for NullRuntime
impl UnwindSafe for NullRuntime
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
Mutably borrows from an owned value. Read more
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>
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 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>
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 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>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().