pdfium_render/pdf/action/
launch.rs

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