pub struct Action {
pub action_type: ActionType,
pub dict: IndexMap<Vec<u8>, PdfObject>,
}Expand description
A parsed PDF action.
Fields§
§action_type: ActionTypeThe action type.
dict: IndexMap<Vec<u8>, PdfObject>The raw action dictionary.
Implementations§
Source§impl Action
impl Action
Sourcepub fn from_dict(dict: &IndexMap<Vec<u8>, PdfObject>) -> Self
pub fn from_dict(dict: &IndexMap<Vec<u8>, PdfObject>) -> Self
Parse an action from a PDF dictionary.
Sourcepub fn from_object(obj: &PdfObject) -> Option<Self>
pub fn from_object(obj: &PdfObject) -> Option<Self>
Parse from a PdfObject (must be a dict).
Sourcepub fn javascript(&self) -> Option<String>
pub fn javascript(&self) -> Option<String>
Get the JavaScript source for a JavaScript action.
Sourcepub fn destination(&self) -> Option<&PdfObject>
pub fn destination(&self) -> Option<&PdfObject>
Get the destination for a GoTo action.
Sourcepub fn named_action(&self) -> Option<String>
pub fn named_action(&self) -> Option<String>
Get the named action name (for Named actions).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnsafeUnpin for Action
impl UnwindSafe for Action
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
Mutably borrows from an owned value. Read more