Skip to main content

FormAccess

Trait FormAccess 

Source
pub trait FormAccess {
    // Required methods
    fn form_type(&self) -> FormKind;
    fn field_names(&self) -> Vec<String>;
    fn get_value(&self, path: &str) -> Option<String>;
    fn set_value(&mut self, path: &str, value: &str) -> Result<(), FormError>;
}
Expand description

Unified form field access — works for AcroForm or XFA.

This trait provides a common interface for reading and writing form field values regardless of the underlying form technology.

Required Methods§

Source

fn form_type(&self) -> FormKind

Returns the kind of form (AcroForm, XFA, or None).

Source

fn field_names(&self) -> Vec<String>

Returns all fully-qualified field names in the form.

Source

fn get_value(&self, path: &str) -> Option<String>

Gets the current value of a field by its fully-qualified name.

Source

fn set_value(&mut self, path: &str, value: &str) -> Result<(), FormError>

Sets the value of a field by its fully-qualified name.

Implementors§