pretty_duration/pretty_duration_lib/
pretty_duration_options.rs1#[derive(Copy, Clone)]
2pub enum PrettyDurationOutputFormat {
3 Compact,
4 Expanded,
5 Colon,
6}
7
8#[derive(Clone)]
10pub struct PrettyDurationLabels {
11 pub year: &'static str,
12 pub month: &'static str,
13 pub day: &'static str,
14 pub hour: &'static str,
15 pub minute: &'static str,
16 pub second: &'static str,
17 pub millisecond: &'static str,
18}
19#[derive(Clone)]
21pub struct PrettyDurationOptions {
22 pub output_format: Option<PrettyDurationOutputFormat>,
24 pub singular_labels: Option<PrettyDurationLabels>,
26 pub plural_labels: Option<PrettyDurationLabels>,
28}
29
30#[derive(Clone)]
34pub struct PrettyDurationOptionsWithDefault {
35 pub output_format: PrettyDurationOutputFormat,
36 pub singular_labels: PrettyDurationLabels,
37 pub plural_labels: PrettyDurationLabels,
38}