Struct poppler::StructureElementIter
source · pub struct StructureElementIter { /* private fields */ }
Expand description
GLib type: Boxed type with copy-on-clone semantics.
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(
ptr: &*mut PopplerStructureElementIter,
) -> &Self
pub unsafe fn from_glib_ptr_borrow( ptr: &*mut PopplerStructureElementIter, ) -> &Self
Borrows the underlying C value.
sourcepub unsafe fn from_glib_ptr_borrow_mut(
ptr: &mut *mut PopplerStructureElementIter,
) -> &mut Self
pub unsafe fn from_glib_ptr_borrow_mut( ptr: &mut *mut PopplerStructureElementIter, ) -> &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 for StructureElementIter
impl PartialEq 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 for StructureElementIter
impl PartialOrd 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
.impl Eq for StructureElementIter
impl StructuralPartialEq for StructureElementIter
Auto Trait Implementations§
impl Freeze for StructureElementIter
impl RefUnwindSafe for StructureElementIter
impl !Send for StructureElementIter
impl !Sync for StructureElementIter
impl Unpin for StructureElementIter
impl UnwindSafe for StructureElementIter
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)