1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
use crate::models::params::{RowExcludeFlags, RowIncludeFlags};
use crate::models::EnumStr;
use std::fmt;
#[derive(Debug)]
pub enum SheetIncludeFlags {
Base(RowIncludeFlags),
CrossSheetReferences,
FilterDefinitions,
GanttConfig,
OwnerInfo,
Proofs,
Source,
}
impl EnumStr for SheetIncludeFlags {
fn as_str<'a>(&self) -> &'a str {
match self {
Self::Base(flags) => flags.as_str(),
Self::CrossSheetReferences => "crossSheetReferences",
Self::FilterDefinitions => "filterDefinitions",
Self::GanttConfig => "ganttConfig",
Self::OwnerInfo => "ownerInfo",
Self::Proofs => "proofs",
Self::Source => "source",
}
}
}
impl fmt::Display for SheetIncludeFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.write_str(self.as_str())
}
}
#[derive(Debug)]
pub enum SheetExcludeFlags {
Base(RowExcludeFlags),
FilteredOutRows,
}
impl EnumStr for SheetExcludeFlags {
fn as_str<'a>(&self) -> &'a str {
match self {
Self::Base(flags) => flags.as_str(),
Self::FilteredOutRows => "filteredOutRows",
}
}
}
impl fmt::Display for SheetExcludeFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.write_str(self.as_str())
}
}