pub struct StructAttribute {
pub owner: String,
pub entries: Vec<(String, AttributeValue)>,
}Expand description
A single attribute dictionary associated with a structure element.
Fields§
§owner: StringThe attribute owner (from /O).
entries: Vec<(String, AttributeValue)>Key-value entries from the attribute dictionary (excluding /O).
Implementations§
Source§impl StructAttribute
impl StructAttribute
Sourcepub fn owner(&self) -> &str
pub fn owner(&self) -> &str
Returns the attribute owner name (from /O key, e.g. "Layout", "Table").
Sourcepub fn entry_count(&self) -> usize
pub fn entry_count(&self) -> usize
Returns the number of key-value entries in this attribute dictionary.
Corresponds to upstream FPDF_StructElement_Attr_GetCount.
Sourcepub fn struct_element_attr_get_count(&self) -> usize
pub fn struct_element_attr_get_count(&self) -> usize
ADR-019 Tier 2 alias for entry_count().
Corresponds to upstream FPDF_StructElement_Attr_GetCount.
Sourcepub fn get_count(&self) -> usize
👎Deprecated since 0.1.0: use struct_element_attr_get_count() — matches upstream FPDF_StructElement_Attr_GetCount
pub fn get_count(&self) -> usize
use struct_element_attr_get_count() — matches upstream FPDF_StructElement_Attr_GetCount
Deprecated short alias — use struct_element_attr_get_count()
or entry_count() instead.
Sourcepub fn entry_name_at_index(&self, index: usize) -> Option<&str>
pub fn entry_name_at_index(&self, index: usize) -> Option<&str>
Returns the name (key) of the entry at a given zero-based index, or None.
Corresponds to upstream FPDF_StructElement_Attr_GetName.
Sourcepub fn struct_element_attr_get_name(&self, index: usize) -> Option<&str>
pub fn struct_element_attr_get_name(&self, index: usize) -> Option<&str>
ADR-019 Tier 2 alias for
entry_name_at_index().
Corresponds to upstream FPDF_StructElement_Attr_GetName.
Sourcepub fn get_name(&self, index: usize) -> Option<&str>
👎Deprecated since 0.1.0: use struct_element_attr_get_name() — matches upstream FPDF_StructElement_Attr_GetName
pub fn get_name(&self, index: usize) -> Option<&str>
use struct_element_attr_get_name() — matches upstream FPDF_StructElement_Attr_GetName
Deprecated short alias — use struct_element_attr_get_name()
or entry_name_at_index() instead.
Sourcepub fn value_for_key(&self, name: &str) -> Option<&AttributeValue>
pub fn value_for_key(&self, name: &str) -> Option<&AttributeValue>
Returns a reference to the value for the entry with the given key name, or None.
Corresponds to upstream FPDF_StructElement_Attr_GetValue.
Sourcepub fn struct_element_attr_get_value(
&self,
name: &str,
) -> Option<&AttributeValue>
pub fn struct_element_attr_get_value( &self, name: &str, ) -> Option<&AttributeValue>
ADR-019 Tier 2 alias for
value_for_key().
Corresponds to upstream FPDF_StructElement_Attr_GetValue.
Sourcepub fn get_value(&self, name: &str) -> Option<&AttributeValue>
👎Deprecated since 0.1.0: use struct_element_attr_get_value() — matches upstream FPDF_StructElement_Attr_GetValue
pub fn get_value(&self, name: &str) -> Option<&AttributeValue>
use struct_element_attr_get_value() — matches upstream FPDF_StructElement_Attr_GetValue
Deprecated short alias — use struct_element_attr_get_value()
or value_for_key() instead.
Sourcepub fn value_at_index(&self, index: usize) -> Option<&AttributeValue>
pub fn value_at_index(&self, index: usize) -> Option<&AttributeValue>
Returns a reference to the value at the given zero-based index, or None.
Trait Implementations§
Source§impl Clone for StructAttribute
impl Clone for StructAttribute
Source§fn clone(&self) -> StructAttribute
fn clone(&self) -> StructAttribute
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more