pub struct Permissions(/* private fields */);Expand description
Typed wrapper for the PDF permission bits stored in the /P field of the
encrypt dictionary (PDF 1.7 spec, Table 3.20).
The raw value is a signed 32-bit integer where the upper bits are always 1 per the spec; only bits 3, 5, 8, and 9 carry meaningful permission flags.
Implementations§
Source§impl Permissions
impl Permissions
Sourcepub fn modify_content(self) -> bool
pub fn modify_content(self) -> bool
Bit 4: Allow modifying document content.
Sourcepub fn modify_annotation(self) -> bool
pub fn modify_annotation(self) -> bool
Bit 6: Allow adding, modifying, or deleting annotations.
Sourcepub fn extract_for_accessibility(self) -> bool
pub fn extract_for_accessibility(self) -> bool
Bit 10: Allow extracting text and graphics for accessibility.
Trait Implementations§
Source§impl Clone for Permissions
impl Clone for Permissions
Source§fn clone(&self) -> Permissions
fn clone(&self) -> Permissions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Permissions
impl Debug for Permissions
Source§impl PartialEq for Permissions
impl PartialEq for Permissions
impl Copy for Permissions
impl Eq for Permissions
impl StructuralPartialEq for Permissions
Auto Trait Implementations§
impl Freeze for Permissions
impl RefUnwindSafe for Permissions
impl Send for Permissions
impl Sync for Permissions
impl Unpin for Permissions
impl UnsafeUnpin for Permissions
impl UnwindSafe for Permissions
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