Struct poppler::StructureElementIter
source · #[repr(transparent)]pub struct StructureElementIter { /* private fields */ }
Implementations§
source§impl StructureElementIter
impl StructureElementIter
sourcepub fn as_ptr(&self) -> *mut PopplerStructureElementIter
pub fn as_ptr(&self) -> *mut PopplerStructureElementIter
Return the inner pointer to the underlying C value.
sourcepub unsafe fn from_glib_ptr_borrow<'a>(
ptr: *const *const PopplerStructureElementIter
) -> &'a Self
pub unsafe fn from_glib_ptr_borrow<'a>( ptr: *const *const PopplerStructureElementIter ) -> &'a Self
Borrows the underlying C value.
sourcepub unsafe fn from_glib_ptr_borrow_mut<'a>(
ptr: *mut *mut PopplerStructureElementIter
) -> &'a mut Self
pub unsafe fn from_glib_ptr_borrow_mut<'a>( ptr: *mut *mut PopplerStructureElementIter ) -> &'a mut Self
Borrows the underlying C value mutably.
source§impl StructureElementIter
impl StructureElementIter
sourcepub fn new(poppler_document: &Document) -> StructureElementIter
pub fn new(poppler_document: &Document) -> StructureElementIter
Returns the root StructureElementIter
for document
, or None
. The
returned value must be freed with poppler_structure_element_iter_free()
.
Documents may have an associated structure tree —mostly, Tagged-PDF
compliant documents— which can be used to obtain information about
the document structure and its contents. Each node in the tree contains
a StructureElement
.
Here is a simple example that walks the whole tree:
<informalexample>``<programlisting>
static void
walk_structure (PopplerStructureElementIter iter)
{
do {
/ Get the element and do something with it */
PopplerStructureElementIter *child = poppler_structure_element_iter_get_child (iter);
if (child)
walk_structure (child);
poppler_structure_element_iter_free (child);
} while (poppler_structure_element_iter_next (iter));
}
…
{
iter = poppler_structure_element_iter_new (document);
walk_structure (iter);
poppler_structure_element_iter_free (iter);
}
</programlisting>``</informalexample>
poppler_document
a Document
.
Returns
a new StructureElementIter
, or None
if document
doesn’t have structure tree.
sourcepub fn child(&mut self) -> Option<StructureElementIter>
pub fn child(&mut self) -> Option<StructureElementIter>
Returns a new iterator to the children elements of the
StructureElement
associated with iter
. The returned value must
be freed with poppler_structure_element_iter_free()
.
Returns
a new StructureElementIter
sourcepub fn element(&mut self) -> Option<StructureElement>
pub fn element(&mut self) -> Option<StructureElement>
Trait Implementations§
source§impl Clone for StructureElementIter
impl Clone for StructureElementIter
source§impl Debug for StructureElementIter
impl Debug for StructureElementIter
source§impl From<StructureElementIter> for Value
impl From<StructureElementIter> for Value
source§fn from(o: StructureElementIter) -> Self
fn from(o: StructureElementIter) -> Self
source§impl HasParamSpec for StructureElementIter
impl HasParamSpec for StructureElementIter
type ParamSpec = ParamSpecBoxed
§type SetValue = StructureElementIter
type SetValue = StructureElementIter
type BuilderFn = fn(_: &str) -> ParamSpecBoxedBuilder<'_, StructureElementIter>
fn param_spec_builder() -> Self::BuilderFn
source§impl Hash for StructureElementIter
impl Hash for StructureElementIter
source§impl Ord for StructureElementIter
impl Ord for StructureElementIter
source§fn cmp(&self, other: &StructureElementIter) -> Ordering
fn cmp(&self, other: &StructureElementIter) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<StructureElementIter> for StructureElementIter
impl PartialEq<StructureElementIter> for StructureElementIter
source§fn eq(&self, other: &StructureElementIter) -> bool
fn eq(&self, other: &StructureElementIter) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<StructureElementIter> for StructureElementIter
impl PartialOrd<StructureElementIter> for StructureElementIter
source§fn partial_cmp(&self, other: &StructureElementIter) -> Option<Ordering>
fn partial_cmp(&self, other: &StructureElementIter) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl StaticType for StructureElementIter
impl StaticType for StructureElementIter
source§fn static_type() -> Type
fn static_type() -> Type
Self
.