pub struct FieldTree {
pub calculation_order: Vec<FieldId>,
pub document_da: Option<String>,
pub document_quadding: Option<Quadding>,
pub need_appearances: bool,
pub sig_flags: u32,
/* private fields */
}Expand description
The complete AcroForm field tree.
Fields§
§calculation_order: Vec<FieldId>Calculation order (/CO) — field IDs in evaluation order.
document_da: Option<String>Document-level default appearance (/DA).
document_quadding: Option<Quadding>Document-level quadding (/Q).
need_appearances: boolWhether /NeedAppearances is set.
sig_flags: u32SigFlags value.
Implementations§
Source§impl FieldTree
impl FieldTree
Sourcepub fn terminal_fields(&self) -> Vec<FieldId>
pub fn terminal_fields(&self) -> Vec<FieldId>
Return IDs of all terminal (leaf/widget) fields.
Sourcepub fn fully_qualified_name(&self, id: FieldId) -> String
pub fn fully_qualified_name(&self, id: FieldId) -> String
Compute the fully qualified field name by walking up the parent chain.
Sourcepub fn effective_field_type(&self, id: FieldId) -> Option<FieldType>
pub fn effective_field_type(&self, id: FieldId) -> Option<FieldType>
Walk up the tree to find the effective field type.
Sourcepub fn effective_value(&self, id: FieldId) -> Option<&FieldValue>
pub fn effective_value(&self, id: FieldId) -> Option<&FieldValue>
Walk up the tree to find the effective value.
Sourcepub fn effective_da(&self, id: FieldId) -> Option<&str>
pub fn effective_da(&self, id: FieldId) -> Option<&str>
Walk up the tree to find the effective DA string.
Sourcepub fn effective_quadding(&self, id: FieldId) -> Quadding
pub fn effective_quadding(&self, id: FieldId) -> Quadding
Walk up the tree to find the effective quadding.
Sourcepub fn effective_flags(&self, id: FieldId) -> FieldFlags
pub fn effective_flags(&self, id: FieldId) -> FieldFlags
Walk up the tree to get effective flags.
Sourcepub fn effective_max_len(&self, id: FieldId) -> Option<u32>
pub fn effective_max_len(&self, id: FieldId) -> Option<u32>
Walk up the tree to find the effective MaxLen.
/MaxLen is treated as inheritable (like /FT, /DA, /Q): if a
widget does not carry it directly, the value propagates from the nearest
ancestor that does.
Sourcepub fn find_by_name(&self, name: &str) -> Option<FieldId>
pub fn find_by_name(&self, name: &str) -> Option<FieldId>
Find a terminal field by fully qualified name.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FieldTree
impl RefUnwindSafe for FieldTree
impl Send for FieldTree
impl Sync for FieldTree
impl Unpin for FieldTree
impl UnsafeUnpin for FieldTree
impl UnwindSafe for FieldTree
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 more