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_text_field_mut(&mut self) -> Option<&mut PdfFormTextField<'a>>
pub fn as_text_field_mut(&mut self) -> Option<&mut PdfFormTextField<'a>>
Returns a mutable reference to 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.
Trait Implementations§
source§impl<'a> From<PdfFormCheckboxField<'a>> for PdfFormField<'a>
impl<'a> From<PdfFormCheckboxField<'a>> for PdfFormField<'a>
source§fn from(field: PdfFormCheckboxField<'a>) -> Self
fn from(field: PdfFormCheckboxField<'a>) -> Self
source§impl<'a> From<PdfFormComboBoxField<'a>> for PdfFormField<'a>
impl<'a> From<PdfFormComboBoxField<'a>> for PdfFormField<'a>
source§fn from(field: PdfFormComboBoxField<'a>) -> Self
fn from(field: PdfFormComboBoxField<'a>) -> Self
source§impl<'a> From<PdfFormListBoxField<'a>> for PdfFormField<'a>
impl<'a> From<PdfFormListBoxField<'a>> for PdfFormField<'a>
source§fn from(field: PdfFormListBoxField<'a>) -> Self
fn from(field: PdfFormListBoxField<'a>) -> Self
source§impl<'a> From<PdfFormPushButtonField<'a>> for PdfFormField<'a>
impl<'a> From<PdfFormPushButtonField<'a>> for PdfFormField<'a>
source§fn from(field: PdfFormPushButtonField<'a>) -> Self
fn from(field: PdfFormPushButtonField<'a>) -> Self
source§impl<'a> From<PdfFormRadioButtonField<'a>> for PdfFormField<'a>
impl<'a> From<PdfFormRadioButtonField<'a>> for PdfFormField<'a>
source§fn from(field: PdfFormRadioButtonField<'a>) -> Self
fn from(field: PdfFormRadioButtonField<'a>) -> Self
source§impl<'a> From<PdfFormSignatureField<'a>> for PdfFormField<'a>
impl<'a> From<PdfFormSignatureField<'a>> for PdfFormField<'a>
source§fn from(field: PdfFormSignatureField<'a>) -> Self
fn from(field: PdfFormSignatureField<'a>) -> Self
source§impl<'a> From<PdfFormTextField<'a>> for PdfFormField<'a>
impl<'a> From<PdfFormTextField<'a>> for PdfFormField<'a>
source§fn from(field: PdfFormTextField<'a>) -> Self
fn from(field: PdfFormTextField<'a>) -> Self
source§impl<'a> From<PdfFormUnknownField<'a>> for PdfFormField<'a>
impl<'a> From<PdfFormUnknownField<'a>> for PdfFormField<'a>
source§fn from(field: PdfFormUnknownField<'a>) -> Self
fn from(field: PdfFormUnknownField<'a>) -> Self
Auto Trait Implementations§
impl<'a> Freeze for PdfFormField<'a>
impl<'a> !RefUnwindSafe for PdfFormField<'a>
impl<'a> !Send for PdfFormField<'a>
impl<'a> !Sync for PdfFormField<'a>
impl<'a> Unpin for PdfFormField<'a>
impl<'a> !UnwindSafe for PdfFormField<'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
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