pub struct PdfBookmark<'a> { /* private fields */ }Expand description
A single bookmark in a PdfBookmarks collection.
Implementations§
Source§impl<'a> PdfBookmark<'a>
impl<'a> PdfBookmark<'a>
Sourcepub fn bindings(&self) -> &'a dyn PdfiumLibraryBindings
pub fn bindings(&self) -> &'a dyn PdfiumLibraryBindings
Returns the PdfiumLibraryBindings used by this PdfBookmark.
Sourcepub fn title(&self) -> Option<String>
pub fn title(&self) -> Option<String>
Returns the title of this PdfBookmark, if any.
Sourcepub fn action(&self) -> Option<PdfAction<'a>>
pub fn action(&self) -> Option<PdfAction<'a>>
Returns the PdfAction associated with this PdfBookmark, if any.
The action indicates the behaviour that will occur when the user interacts with the bookmark in a PDF viewer. For most bookmarks, this will be a local navigation action of type PdfActionType::GoToDestinationInSameDocument, but the PDF file format supports a variety of other actions.
Sourcepub fn destination(&self) -> Option<PdfDestination<'a>>
pub fn destination(&self) -> Option<PdfDestination<'a>>
Returns the PdfDestination associated with this PdfBookmark, if any.
The destination specifies the page and region, if any, that will be the target of the action behaviour specified by PdfBookmark::action().
Sourcepub fn parent(&self) -> Option<PdfBookmark<'a>>
pub fn parent(&self) -> Option<PdfBookmark<'a>>
Returns this PdfBookmark object’s direct parent, if available.
Sourcepub fn children_len(&self) -> usize
pub fn children_len(&self) -> usize
Returns the number of direct children of this PdfBookmark.
Sourcepub fn first_child(&self) -> Option<PdfBookmark<'a>>
pub fn first_child(&self) -> Option<PdfBookmark<'a>>
Returns the first child PdfBookmark of this PdfBookmark, if any.
Sourcepub fn next_sibling(&self) -> Option<PdfBookmark<'a>>
pub fn next_sibling(&self) -> Option<PdfBookmark<'a>>
Returns the next PdfBookmark at the same tree level as this PdfBookmark, if any.
Sourcepub fn iter_siblings(&self) -> PdfBookmarksIterator<'a> ⓘ
pub fn iter_siblings(&self) -> PdfBookmarksIterator<'a> ⓘ
Returns an iterator over all PdfBookmark sibling nodes of this PdfBookmark.
Sourcepub fn iter_direct_children(&self) -> PdfBookmarksIterator<'a> ⓘ
pub fn iter_direct_children(&self) -> PdfBookmarksIterator<'a> ⓘ
Returns an iterator over all PdfBookmark child nodes of this PdfBookmark. Only direct children of this PdfBookmark will be traversed by the iterator; grandchildren, great-grandchildren, and other descendant nodes will be ignored. To visit all child nodes, including children of children, use PdfBookmark::iter_all_descendants().
Sourcepub fn iter_all_descendants(&self) -> PdfBookmarksIterator<'a> ⓘ
pub fn iter_all_descendants(&self) -> PdfBookmarksIterator<'a> ⓘ
Returns an iterator over all PdfBookmark descendant nodes of this PdfBookmark, including any children of those nodes. To visit only direct children of this PdfBookmark, use PdfBookmark::iter_direct_children().
Trait Implementations§
Source§impl<'a> Clone for PdfBookmark<'a>
impl<'a> Clone for PdfBookmark<'a>
Source§fn clone(&self) -> PdfBookmark<'a>
fn clone(&self) -> PdfBookmark<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Hash for PdfBookmark<'a>
impl<'a> Hash for PdfBookmark<'a>
Source§impl<'a> PartialEq for PdfBookmark<'a>
impl<'a> PartialEq for PdfBookmark<'a>
impl<'a> Eq for PdfBookmark<'a>
Auto Trait Implementations§
impl<'a> Freeze for PdfBookmark<'a>
impl<'a> !RefUnwindSafe for PdfBookmark<'a>
impl<'a> !Send for PdfBookmark<'a>
impl<'a> !Sync for PdfBookmark<'a>
impl<'a> Unpin for PdfBookmark<'a>
impl<'a> !UnwindSafe for PdfBookmark<'a>
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§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