pub enum TextFieldKind {
Normal,
Multiline,
Password,
Comb,
RichText,
FileSelect,
}Expand description
Sub-kind of a text (/Tx) field, derived from its flags word.
AcroForm models all text input variants as the same field type; the
flags below distinguish the visual presentation and validation rules.
Use text_field_kind to derive this enum from a FieldFlags value.
The variants are checked in priority order — for example, a field with
both FileSelect and Multiline set resolves to Self::FileSelect.
Variants§
Normal
Single-line free-text input. Default when no specialization flag is set.
Multiline
Multi-line text input — text wraps at the field width and accepts
embedded newlines. (Multiline flag set.)
Password
Single-line input that masks each character (typical for password
entry). (Password flag set.)
Comb
Fixed-pitch input divided into MaxLen equally-spaced cells —
useful for serial numbers, postal codes. Requires MaxLen to be
set on the field. (Comb flag set.)
RichText
Rich-text input where the value carries XHTML formatting in
addition to the plain text. (RichText flag set.)
FileSelect
File-selector field: the value is a path to a local file the user
selected via the viewer’s file dialog. (FileSelect flag set.)
Trait Implementations§
Source§impl Clone for TextFieldKind
impl Clone for TextFieldKind
Source§fn clone(&self) -> TextFieldKind
fn clone(&self) -> TextFieldKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TextFieldKind
impl Debug for TextFieldKind
Source§impl PartialEq for TextFieldKind
impl PartialEq for TextFieldKind
Source§fn eq(&self, other: &TextFieldKind) -> bool
fn eq(&self, other: &TextFieldKind) -> bool
self and other values to be equal, and is used by ==.impl Copy for TextFieldKind
impl Eq for TextFieldKind
impl StructuralPartialEq for TextFieldKind
Auto Trait Implementations§
impl Freeze for TextFieldKind
impl RefUnwindSafe for TextFieldKind
impl Send for TextFieldKind
impl Sync for TextFieldKind
impl Unpin for TextFieldKind
impl UnsafeUnpin for TextFieldKind
impl UnwindSafe for TextFieldKind
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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