Skip to main content

Field

Struct Field 

Source
pub struct Field {
    pub id: ObjectId,
    pub fqn: String,
    pub rect: Option<[f32; 4]>,
    pub is_button: bool,
    pub max_len: Option<usize>,
}
Expand description

One terminal (leaf) AcroForm field: its object id, fully-qualified name, widget rectangle, and whether it is a checkbox (/FT /Btn).

Fields§

§id: ObjectId

lopdf object id of the field dictionary.

§fqn: String

Fully-qualified, bracketed name (topmostSubform[0].Page1[0]…f1_03[0]).

§rect: Option<[f32; 4]>

Widget rectangle [x0, y0, x1, y1] in PDF user space, if present.

§is_button: bool

true iff /FT is /Btn (a checkbox/radio).

§max_len: Option<usize>

/MaxLen — the cell’s character capacity, when the form declares one (inheritable, like /FT).

The IRS forms set this on their comb cells (the SSN boxes are /MaxLen 9, comb-flagged), and it is the PRIMARY SOURCE for how a value must be formatted: nine characters means nine bare digits, not a hyphenated 123-45-6789, which is eleven and would be silently truncated by the viewer. crate::verify::verify_flat enforces it on read-back, so an over-long write fails closed instead of being quietly mangled.

Implementations§

Source§

impl Field

Source

pub fn cx(&self) -> Option<f32>

Horizontal center of the widget rectangle.

Source

pub fn cy(&self) -> Option<f32>

Vertical center of the widget rectangle.

Trait Implementations§

Source§

impl Clone for Field

Source§

fn clone(&self) -> Field

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Field

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Field

§

impl RefUnwindSafe for Field

§

impl Send for Field

§

impl Sync for Field

§

impl Unpin for Field

§

impl UnsafeUnpin for Field

§

impl UnwindSafe for Field

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V