pub struct PdfBookmarks<'a> { /* private fields */ }
Expand description

The bookmarks contained within a single PdfDocument.

Bookmarks in PDF files form a tree structure, branching out from a top-level root bookmark. The PdfBookmarks::root() returns the root bookmark in the containing PdfDocument, if any; use the root’s PdfBookmark::first_child() and PdfBookmark::next_sibling() functions to traverse the bookmark tree.

To search the tree for a bookmark with a specific title, use the PdfBookmarks::find_first_by_title() and PdfBookmarks::find_all_by_title() functions. To traverse the tree breadth-first, visiting every bookmark in the tree, create an iterator using the PdfBookmarks::iter() function.

Implementations

Returns the root PdfBookmark in the containing PdfDocument, if any.

Returns the first PdfBookmark in the containing PdfDocument that has a title matching the given string.

Note that bookmarks are not required to have unique titles, so in theory any number of bookmarks could match a given title. This function only ever returns the first. To return all matches, use PdfBookmarks::find_all_by_title().

Returns all PdfBookmark objects in the containing PdfDocument that have a title matching the given string.

Note that bookmarks are not required to have unique titles, so in theory any number of bookmarks could match a given title. This function returns all matches by performing a complete breadth-first traversal of the entire bookmark tree. To return just the first match, use PdfBookmarks::find_first_by_title().

Returns a breadth-first iterator over all the PdfBookmark objects in the containing PdfDocument, starting from the top-level root bookmark.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.