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 a reference to 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 a reference to the underlying PdfFormCheckboxField for this PdfFormField, if this form field has a field type of PdfFormField::Checkbox.
Sourcepub fn as_checkbox_field_mut(&mut self) -> Option<&mut PdfFormCheckboxField<'a>>
pub fn as_checkbox_field_mut(&mut self) -> Option<&mut PdfFormCheckboxField<'a>>
Returns a mutable reference to the underlying PdfFormCheckboxField for this PdfFormField, if this form field has a field type of PdfFormField::Checkbox.
Returns a reference to the underlying PdfFormRadioButtonField for this PdfFormField, if this form field has a field type of PdfFormField::RadioButton.
Returns a mutable reference to 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 a reference to 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 a reference to 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 a reference to 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 a reference to 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 a reference to 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 moreSource§impl<'a, T> PdfFormFieldCommon for Twhere
T: PdfFormFieldPrivate<'a>,
impl<'a, T> PdfFormFieldCommon for Twhere
T: PdfFormFieldPrivate<'a>,
Source§fn appearance_stream(&self) -> Option<String>
fn appearance_stream(&self) -> Option<String>
Source§fn appearance_mode_value(
&self,
appearance_mode: PdfAppearanceMode,
) -> Option<String>
fn appearance_mode_value( &self, appearance_mode: PdfAppearanceMode, ) -> Option<String>
Source§fn is_read_only(&self) -> bool
fn is_read_only(&self) -> bool
Source§fn set_is_read_only(&mut self, is_read_only: bool) -> Result<(), PdfiumError>
fn set_is_read_only(&mut self, is_read_only: bool) -> Result<(), PdfiumError>
Source§fn is_required(&self) -> bool
fn is_required(&self) -> bool
true if this PdfFormField must have a value at the time it is exported
by any “submit form” action. Read moreSource§fn set_is_required(&mut self, is_required: bool) -> Result<(), PdfiumError>
fn set_is_required(&mut self, is_required: bool) -> Result<(), PdfiumError>
Source§fn is_exported_on_submit(&self) -> bool
fn is_exported_on_submit(&self) -> bool
true if the value of this PdfFormField will be exported by any
“submit form” action. Read more