pdfium_render/pdf/action/
embedded_destination.rs

1//! Defines the [PdfActionEmbeddedDestination] struct, exposing functionality related to a single
2//! action of type `PdfActionType::GoToDestinationInEmbeddedDocument`.
3
4use crate::bindgen::FPDF_ACTION;
5use crate::bindings::PdfiumLibraryBindings;
6use crate::pdf::action::private::internal::PdfActionPrivate;
7
8pub struct PdfActionEmbeddedDestination<'a> {
9    #[allow(dead_code)]
10    handle: FPDF_ACTION,
11    bindings: &'a dyn PdfiumLibraryBindings,
12}
13
14impl<'a> PdfActionEmbeddedDestination<'a> {
15    #[inline]
16    pub(crate) fn from_pdfium(
17        handle: FPDF_ACTION,
18        bindings: &'a dyn PdfiumLibraryBindings,
19    ) -> Self {
20        PdfActionEmbeddedDestination { handle, bindings }
21    }
22}
23
24impl<'a> PdfActionPrivate<'a> for PdfActionEmbeddedDestination<'a> {
25    #[inline]
26    fn handle(&self) -> &FPDF_ACTION {
27        &self.handle
28    }
29
30    #[inline]
31    fn bindings(&self) -> &dyn PdfiumLibraryBindings {
32        self.bindings
33    }
34}