pub enum SandboxError {
NotCompiledIn,
BodyTooLarge,
Timeout,
OutOfMemory,
StackOverflow,
PhaseDenied(String),
NoBindings,
PanicCaptured(String),
ScriptError(String),
}Expand description
Errors the runtime adapter can emit. Every variant is recoverable at the dispatch site — the parent flatten never aborts because of a sandbox error (S-17 fail-open).
Variants§
NotCompiledIn
Cargo feature xfa-js-sandboxed not compiled in. Returned by
the null::NullRuntime for every execute_script call.
BodyTooLarge
Script body exceeds the per-script size cap (S-11; default 64 KB).
Timeout
Per-script time budget exceeded (S-9; default 100 ms hard).
OutOfMemory
Per-document memory budget exceeded (S-10; default 32 MiB hard).
StackOverflow
Call stack depth exceeded the configured maximum (S-12; default 64).
PhaseDenied(String)
Activity not in the runtime allowlist for sandboxed dispatch (S-14). UI / submission activities skip the runtime entirely at the dispatch boundary and never reach this error path; this variant exists for explicit binding-level phase guards.
NoBindings
Phase B: no host bindings registered. Returned when a script
attempts to read or write any xfa.* / field.* binding the
adapter has not yet exposed.
PanicCaptured(String)
FFI panic captured via std::panic::catch_unwind. Used by the
rquickjs backend to keep panics from crossing the FFI boundary
into the Rust caller.
ScriptError(String)
Generic script-level error: parse, runtime, or thrown JS error.
Trait Implementations§
Source§impl Clone for SandboxError
impl Clone for SandboxError
Source§fn clone(&self) -> SandboxError
fn clone(&self) -> SandboxError
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 SandboxError
impl Debug for SandboxError
Source§impl Display for SandboxError
impl Display for SandboxError
Source§impl Error for SandboxError
impl Error for SandboxError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for SandboxError
impl PartialEq for SandboxError
Source§fn eq(&self, other: &SandboxError) -> bool
fn eq(&self, other: &SandboxError) -> bool
self and other values to be equal, and is used by ==.impl Eq for SandboxError
impl StructuralPartialEq for SandboxError
Auto Trait Implementations§
impl Freeze for SandboxError
impl RefUnwindSafe for SandboxError
impl Send for SandboxError
impl Sync for SandboxError
impl Unpin for SandboxError
impl UnsafeUnpin for SandboxError
impl UnwindSafe for SandboxError
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 more