edit_xlsx/api/
properties.rs

1#[derive(Default)]
2pub struct Properties<'a> {
3    pub(crate) title: Option<&'a str>,
4    pub(crate) subject: Option<&'a str>,
5    pub(crate) author: Option<&'a str>,
6    pub(crate) manager: Option<&'a str>,
7    pub(crate) company: Option<&'a str>,
8    pub(crate) category: Option<&'a str>,
9    pub(crate) keywords: Option<&'a str>,
10    pub(crate) comments: Option<&'a str>,
11    pub(crate) status: Option<&'a str>,
12}
13
14impl<'a> Properties<'a> {
15    pub fn set_title(&mut self, title: &'a str) -> &mut Self {
16        self.title = Some(title);
17        self
18    }
19
20    pub fn set_subject(&mut self, subject: &'a str) -> &mut Self {
21        self.subject = Some(subject);
22        self
23    }
24
25    pub fn set_author(&mut self, author: &'a str) -> &mut Self {
26        self.author = Some(author);
27        self
28    }
29
30    pub fn set_manager(&mut self, manager: &'a str) -> &mut Self {
31        self.manager = Some(manager);
32        self
33    }
34
35    pub fn set_company(&mut self, company: &'a str) -> &mut Self {
36        self.company = Some(company);
37        self
38    }
39
40    pub fn set_category(&mut self, category: &'a str) -> &mut Self {
41        self.category = Some(category);
42        self
43    }
44
45    pub fn set_keywords(&mut self, keywords: &'a str) -> &mut Self {
46        self.keywords = Some(keywords);
47        self
48    }
49
50    pub fn set_comments(&mut self, comments: &'a str) -> &mut Self {
51        self.comments = Some(comments);
52        self
53    }
54
55    pub fn set_status(&mut self, status: &'a str) -> &mut Self {
56        self.status = Some(status);
57        self
58    }
59}