pdfium_render/pdf/action/
launch.rs1use crate::bindgen::FPDF_ACTION;
5use crate::pdf::action::private::internal::PdfActionPrivate;
6use crate::pdfium::PdfiumLibraryBindingsAccessor;
7use std::marker::PhantomData;
8
9pub struct PdfActionLaunch<'a> {
10 #[allow(dead_code)] handle: FPDF_ACTION,
12 lifetime: PhantomData<&'a FPDF_ACTION>,
13}
14
15impl<'a> PdfActionLaunch<'a> {
16 #[inline]
17 pub(crate) fn from_pdfium(handle: FPDF_ACTION) -> Self {
18 PdfActionLaunch {
19 handle,
20 lifetime: PhantomData,
21 }
22 }
23}
24
25impl<'a> PdfActionPrivate<'a> for PdfActionLaunch<'a> {
26 #[inline]
27 fn handle(&self) -> &FPDF_ACTION {
28 &self.handle
29 }
30}
31
32impl<'a> PdfiumLibraryBindingsAccessor<'a> for PdfActionLaunch<'a> {}
33
34#[cfg(feature = "thread_safe")]
35unsafe impl<'a> Send for PdfActionLaunch<'a> {}
36
37#[cfg(feature = "thread_safe")]
38unsafe impl<'a> Sync for PdfActionLaunch<'a> {}