pub enum XfaError {
Show 19 variants
LoadFailed(String),
PacketNotFound(String),
Encrypted(String),
XmlParse(String),
FontError(String),
LayoutError(String),
LayoutFailed(String),
ParseFailed(String),
FormCalcError(String),
Io(Error),
RenderingPolicyUnsupported(String),
ExtractionFailed(String),
TemplateParse(String),
BindingFailed(String),
LayoutFailedAt {
stage: String,
reason: String,
},
RenderFailed(String),
FlattenFailed(String),
UnsupportedFeature(String),
UnsupportedHostCapability {
capability: String,
},
}Expand description
XfaError.
Variants§
LoadFailed(String)
LoadFailed.
PacketNotFound(String)
PacketNotFound.
Encrypted(String)
Encrypted.
XmlParse(String)
XmlParse.
FontError(String)
FontError.
LayoutError(String)
LayoutError.
LayoutFailed(String)
LayoutFailed.
ParseFailed(String)
ParseFailed.
FormCalcError(String)
FormCalcError.
Io(Error)
Io.
RenderingPolicyUnsupported(String)
RenderingPolicyUnsupported. D11. The requested
crate::flatten::XfaRenderingPolicy is not available in the calling
context (e.g. a future/unknown policy, or a command such as flatten
that applies SavedStateFaithful only). Both SavedStateFaithful (the
default, production policy) and FreshMergeExperimental (experimental,
opt-in) are implemented as of D12; this variant exists so an unavailable
policy fails loudly rather than silently producing default output under
the wrong label.
ExtractionFailed(String)
XFA packet extraction failed (e.g. missing /AcroForm, corrupt stream).
TemplateParse(String)
Template XML could not be parsed.
BindingFailed(String)
Data binding from datasets to template failed.
LayoutFailedAt
LayoutFailedAt. LayoutFailedAt. Layout failed at a specific pipeline stage.
Use this variant when you can identify which stage (e.g. “paginate”, “split”, “occur”) caused the failure so callers can give better diagnostics.
RenderFailed(String)
PDF content stream generation failed.
FlattenFailed(String)
Final PDF serialisation / flatten step failed.
UnsupportedFeature(String)
Feature is intentionally unsupported by the non-interactive XFA engine.
UnsupportedHostCapability
XFA-JS-HOST-STUBS — A script reached a host capability that requires
genuine user / viewer interaction (e.g. xfa.host.messageBox,
xfa.host.openList, xfa.signature.sign). The flatten pipeline runs
non-interactively, so the call cannot be satisfied honestly. Inside the
sandbox the call is short-circuited to a safe default and counted in
crate::DynamicScriptOutcome::js_unsupported_host_calls; this error
variant exists for synchronous Rust API surfaces that want to surface
the gap to embedding callers rather than silently absorb it.
The capability string is a stable, well-known identifier such as
"xfa.host.messageBox" and is suitable for inclusion in diagnostics.
Trait Implementations§
Source§impl Error for XfaError
impl Error for XfaError
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()
Auto Trait Implementations§
impl Freeze for XfaError
impl !RefUnwindSafe for XfaError
impl Send for XfaError
impl Sync for XfaError
impl Unpin for XfaError
impl UnsafeUnpin for XfaError
impl !UnwindSafe for XfaError
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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