pub struct PdfFormTextField<'a> { /* private fields */ }Expand description
A single PdfFormField of type PdfFormFieldType::Text. The form field object defines an interactive data entry widget that allows the user to enter data by typing.
Form fields in Pdfium are wrapped inside page annotations of type PdfPageAnnotationType::Widget or PdfPageAnnotationType::XfaWidget. User-specified values can be retrieved directly from each form field object by unwrapping the form field from the annotation, or in bulk from the PdfForm::field_values() function.
Implementations§
Source§impl<'a> PdfFormTextField<'a>
impl<'a> PdfFormTextField<'a>
Sourcepub fn bindings(&self) -> &'a dyn PdfiumLibraryBindings
pub fn bindings(&self) -> &'a dyn PdfiumLibraryBindings
Returns the PdfiumLibraryBindings used by this PdfFormTextField object.
Sourcepub fn value(&self) -> Option<String>
pub fn value(&self) -> Option<String>
Returns the value assigned to this PdfFormTextField object, if any.
Sourcepub fn set_value(&mut self, value: &str) -> Result<(), PdfiumError>
pub fn set_value(&mut self, value: &str) -> Result<(), PdfiumError>
Sets the value of this PdfFormTextField object.
Trait Implementations§
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
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for PdfFormTextField<'a>
impl<'a> !RefUnwindSafe for PdfFormTextField<'a>
impl<'a> !Send for PdfFormTextField<'a>
impl<'a> !Sync for PdfFormTextField<'a>
impl<'a> Unpin for PdfFormTextField<'a>
impl<'a> !UnwindSafe for PdfFormTextField<'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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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>
Returns the name of the currently set appearance stream for this PdfFormField, if any.
Source§fn appearance_mode_value(
&self,
appearance_mode: PdfAppearanceMode,
) -> Option<String>
fn appearance_mode_value( &self, appearance_mode: PdfAppearanceMode, ) -> Option<String>
Returns the value currently set for the given appearance mode for this PdfFormField,
if any.