graphitepdf_kit/
security.rs1#[derive(Clone, Debug, Default)]
2pub struct SecurityOptions {
3 pub user_password: Option<String>,
4 pub owner_password: Option<String>,
5 pub permissions: Permissions,
6}
7
8#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
9pub struct Permissions {
10 pub print: bool,
11 pub modify: bool,
12 pub copy: bool,
13 pub annotate: bool,
14}
15
16impl Permissions {
17 pub fn all() -> Self {
18 Self {
19 print: true,
20 modify: true,
21 copy: true,
22 annotate: true,
23 }
24 }
25
26 pub fn none() -> Self {
27 Self::default()
28 }
29}