Enum pdfium_render::form_field::PdfFormField
source · pub enum PdfFormField<'a> {
PushButton(PdfFormPushButtonField<'a>),
Checkbox(PdfFormCheckboxField<'a>),
RadioButton(PdfFormRadioButtonField<'a>),
ComboBox(PdfFormComboBoxField<'a>),
ListBox(PdfFormListBoxField<'a>),
Signature(PdfFormSignatureField<'a>),
Text(PdfFormTextField<'a>),
Unknown(PdfFormUnknownField<'a>),
}Expand description
A single interactive form field in a PdfForm.
Variants§
PushButton(PdfFormPushButtonField<'a>)
Checkbox(PdfFormCheckboxField<'a>)
RadioButton(PdfFormRadioButtonField<'a>)
ComboBox(PdfFormComboBoxField<'a>)
ListBox(PdfFormListBoxField<'a>)
Signature(PdfFormSignatureField<'a>)
Text(PdfFormTextField<'a>)
Unknown(PdfFormUnknownField<'a>)
Implementations§
source§impl<'a> PdfFormField<'a>
impl<'a> PdfFormField<'a>
sourcepub fn field_type(&self) -> PdfFormFieldType
pub fn field_type(&self) -> PdfFormFieldType
The type of this PdfFormField.
Returns the underlying PdfFormPushButtonField for this PdfFormField, if this form field has a field type of PdfFormField::PushButton.
sourcepub fn as_checkbox_field(&self) -> Option<&PdfFormCheckboxField<'_>>
pub fn as_checkbox_field(&self) -> Option<&PdfFormCheckboxField<'_>>
Returns the underlying PdfFormCheckboxField for this PdfFormField, if this form field has a field type of PdfFormField::Checkbox.
Returns the underlying PdfFormRadioButtonField for this PdfFormField, if this form field has a field type of PdfFormField::RadioButton.
sourcepub fn as_combo_box_field(&self) -> Option<&PdfFormComboBoxField<'_>>
pub fn as_combo_box_field(&self) -> Option<&PdfFormComboBoxField<'_>>
Returns the underlying PdfFormComboBoxField for this PdfFormField, if this form field has a field type of PdfFormField::ComboBox.
sourcepub fn as_list_box_field(&self) -> Option<&PdfFormListBoxField<'_>>
pub fn as_list_box_field(&self) -> Option<&PdfFormListBoxField<'_>>
Returns the underlying PdfFormListBoxField for this PdfFormField, if this form field has a field type of PdfFormField::ListBox.
sourcepub fn as_signature_field(&self) -> Option<&PdfFormSignatureField<'_>>
pub fn as_signature_field(&self) -> Option<&PdfFormSignatureField<'_>>
Returns the underlying PdfFormSignatureField for this PdfFormField, if this form field has a field type of PdfFormField::Signature.
sourcepub fn as_text_field(&self) -> Option<&PdfFormTextField<'_>>
pub fn as_text_field(&self) -> Option<&PdfFormTextField<'_>>
Returns the underlying PdfFormTextField for this PdfFormField, if this form field has a field type of PdfFormField::Text.
sourcepub fn as_unknown_field(&self) -> Option<&PdfFormUnknownField<'_>>
pub fn as_unknown_field(&self) -> Option<&PdfFormUnknownField<'_>>
Returns the underlying PdfFormUnknownField for this PdfFormField, if this form field has a field type of PdfFormField::Unknown.