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
#[derive(Copy, Clone)]
pub enum PrettyDurationOutputFormat {
    Compact,
    Expanded,
    Colon,
}

#[derive(Clone)]
pub struct PrettyDurationLabels {
    pub year: &'static str,
    pub month: &'static str,
    pub day: &'static str,
    pub hour: &'static str,
    pub minute: &'static str,
    pub second: &'static str,
    pub millisecond: &'static str,
}
/// Options to change how the produced output
#[derive(Clone)]
pub struct PrettyDurationOptions {
    pub output_format: Option<PrettyDurationOutputFormat>,
    pub compact_labels: Option<PrettyDurationLabels>,
    pub expanded_labels: Option<PrettyDurationLabels>,
}

// Need to fine a way to do like in TypeScript with Required<PrettyDurationOptions>
#[derive(Clone)]
pub struct PrettyDurationOptionsWithDefault {
    pub output_format: PrettyDurationOutputFormat,
    pub compact_labels: PrettyDurationLabels,
    pub expanded_labels: PrettyDurationLabels,
}