Struct PdfFormListBoxField

Source
pub struct PdfFormListBoxField<'a> { /* private fields */ }
Expand description

A single PdfFormField of type PdfFormFieldType::ListBox. The form field object defines an interactive drop-down list widget that allows the user to select a value from a list of options.

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> PdfFormListBoxField<'a>

Source

pub fn bindings(&self) -> &'a dyn PdfiumLibraryBindings

Returns the PdfiumLibraryBindings used by this PdfFormListBoxField object.

Source

pub fn options(&self) -> &PdfFormFieldOptions<'_>

Returns the collection of selectable options in this PdfFormListBoxField.

Source

pub fn value(&self) -> Option<String>

Returns the displayed label for the currently selected option in this PdfFormListBoxField object, if any.

Trait Implementations§

Source§

impl<'a> From<PdfFormListBoxField<'a>> for PdfFormField<'a>

Source§

fn from(field: PdfFormListBoxField<'a>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a> Freeze for PdfFormListBoxField<'a>

§

impl<'a> !RefUnwindSafe for PdfFormListBoxField<'a>

§

impl<'a> !Send for PdfFormListBoxField<'a>

§

impl<'a> !Sync for PdfFormListBoxField<'a>

§

impl<'a> Unpin for PdfFormListBoxField<'a>

§

impl<'a> !UnwindSafe for PdfFormListBoxField<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<'a, T> PdfFormFieldCommon for T
where T: PdfFormFieldPrivate<'a>,

Source§

fn name(&self) -> Option<String>

Returns the name of this PdfFormField, if any.
Source§

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>

Returns the value currently set for the given appearance mode for this PdfFormField, if any.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.