pub enum FormFieldValue {
Text(String),
Boolean(bool),
Choice(String),
MultiChoice(Vec<String>),
None,
}Expand description
Unified form field value type.
This enum provides a consistent interface for field values regardless of whether the field was read from an existing PDF or created new.
Variants§
Text(String)
Text string value (for text fields)
Boolean(bool)
Boolean value (for checkboxes)
Choice(String)
Single choice value (for radio buttons, combo boxes)
MultiChoice(Vec<String>)
Multiple choice values (for multi-select list boxes)
None
No value present
Implementations§
Source§impl FormFieldValue
impl FormFieldValue
Sourcepub fn as_multi_choice(&self) -> Option<&[String]>
pub fn as_multi_choice(&self) -> Option<&[String]>
Get as multi-choice, if this is a multi-choice value.
Trait Implementations§
Source§impl Clone for FormFieldValue
impl Clone for FormFieldValue
Source§fn clone(&self) -> FormFieldValue
fn clone(&self) -> FormFieldValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FormFieldValue
impl Debug for FormFieldValue
Source§impl From<&FieldValue> for FormFieldValue
Convert from reference to extractor’s FieldValue.
impl From<&FieldValue> for FormFieldValue
Convert from reference to extractor’s FieldValue.
Source§fn from(value: &FieldValue) -> Self
fn from(value: &FieldValue) -> Self
Converts to this type from the input type.
Source§impl From<&FormFieldValue> for Object
Convert FormFieldValue to PDF Object for serialization.
impl From<&FormFieldValue> for Object
Convert FormFieldValue to PDF Object for serialization.
Source§fn from(value: &FormFieldValue) -> Self
fn from(value: &FormFieldValue) -> Self
Converts to this type from the input type.
Source§impl From<FieldValue> for FormFieldValue
Convert from extractor’s FieldValue to unified FormFieldValue.
impl From<FieldValue> for FormFieldValue
Convert from extractor’s FieldValue to unified FormFieldValue.
Source§fn from(value: FieldValue) -> Self
fn from(value: FieldValue) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FormFieldValue
impl PartialEq for FormFieldValue
impl StructuralPartialEq for FormFieldValue
Auto Trait Implementations§
impl Freeze for FormFieldValue
impl RefUnwindSafe for FormFieldValue
impl Send for FormFieldValue
impl Sync for FormFieldValue
impl Unpin for FormFieldValue
impl UnwindSafe for FormFieldValue
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