pub struct FormMerger<'a> { /* private fields */ }Expand description
Merges an XFA template (XML) with data from a DataDom to produce a FormTree.
Implementations§
Source§impl<'a> FormMerger<'a>
impl<'a> FormMerger<'a>
Sourcepub fn with_image_files(self, files: HashMap<String, Vec<u8>>) -> Self
pub fn with_image_files(self, files: HashMap<String, Vec<u8>>) -> Self
Set embedded image files for resolving <image href="…"> references.
Sourcepub fn merge(self, template_xml: &str) -> Result<(FormTree, FormNodeId)>
pub fn merge(self, template_xml: &str) -> Result<(FormTree, FormNodeId)>
Merge the template XML into a FormTree.
XFA Spec 3.3 §4.4 p176 — supports both merge modes:
consumeData(default): walk template top-down, bind each node against matching data context positionally.matchTemplate: walk data nodes, find template counterparts by name, bind regardless of hierarchy depth.
Auto Trait Implementations§
impl<'a> Freeze for FormMerger<'a>
impl<'a> RefUnwindSafe for FormMerger<'a>
impl<'a> Send for FormMerger<'a>
impl<'a> Sync for FormMerger<'a>
impl<'a> Unpin for FormMerger<'a>
impl<'a> UnsafeUnpin for FormMerger<'a>
impl<'a> UnwindSafe for FormMerger<'a>
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 more