pub struct Permissions { /* private fields */ }Expand description
Permission flags for encrypted PDFs
Implementations§
Source§impl Permissions
impl Permissions
Sourcepub fn from_flags(flags: PermissionFlags) -> Self
pub fn from_flags(flags: PermissionFlags) -> Self
Create permissions from flags
Sourcepub fn contains(&self, other: Permissions) -> bool
pub fn contains(&self, other: Permissions) -> bool
Check if contains all the specified permissions
Sourcepub fn set_modify_contents(&mut self, allow: bool) -> &mut Self
pub fn set_modify_contents(&mut self, allow: bool) -> &mut Self
Allow/disallow modifying contents (bit 4)
Sourcepub fn can_modify_contents(&self) -> bool
pub fn can_modify_contents(&self) -> bool
Check if modifying contents is allowed
Sourcepub fn set_modify_annotations(&mut self, allow: bool) -> &mut Self
pub fn set_modify_annotations(&mut self, allow: bool) -> &mut Self
Allow/disallow modifying annotations (bit 6)
Sourcepub fn can_modify_annotations(&self) -> bool
pub fn can_modify_annotations(&self) -> bool
Check if modifying annotations is allowed
Sourcepub fn set_fill_forms(&mut self, allow: bool) -> &mut Self
pub fn set_fill_forms(&mut self, allow: bool) -> &mut Self
Allow/disallow filling forms (bit 9)
Sourcepub fn can_fill_forms(&self) -> bool
pub fn can_fill_forms(&self) -> bool
Check if filling forms is allowed
Sourcepub fn set_accessibility(&mut self, allow: bool) -> &mut Self
pub fn set_accessibility(&mut self, allow: bool) -> &mut Self
Allow/disallow accessibility (bit 10)
Sourcepub fn can_access_for_accessibility(&self) -> bool
pub fn can_access_for_accessibility(&self) -> bool
Check if accessibility is allowed
Sourcepub fn set_assemble(&mut self, allow: bool) -> &mut Self
pub fn set_assemble(&mut self, allow: bool) -> &mut Self
Allow/disallow document assembly (bit 11)
Sourcepub fn can_assemble(&self) -> bool
pub fn can_assemble(&self) -> bool
Check if document assembly is allowed
Sourcepub fn set_print_high_quality(&mut self, allow: bool) -> &mut Self
pub fn set_print_high_quality(&mut self, allow: bool) -> &mut Self
Allow/disallow high quality printing (bit 12)
Sourcepub fn can_print_high_quality(&self) -> bool
pub fn can_print_high_quality(&self) -> bool
Check if high quality printing is allowed
Sourcepub fn flags(&self) -> PermissionFlags
pub fn flags(&self) -> PermissionFlags
Get permission flags
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 Default for Permissions
impl Default for Permissions
impl Copy 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 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