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
71
72
//! Module for IDs of CLI objects that can be used to lookup values in [`Seen`].
//!
//! ID also describes the amount of value it can take, encoded in their types.
use crateCompletionGroup;
use crateSeen;
/// Id for things that cannot have value.
///
/// When searching for it in [`Seen`], it will still have an integer value `count`,
/// which represents how many times it's seen in the CLI command
/// ```no_run
/// use supplement::{Seen, id};
/// let seen = Seen::new();
/// let id = id::NoVal::new(0);
/// let c: u32 = seen.find(id).unwrap().count; // Represents how many times it's seen in the CLI command
/// ```
;
/// Id for things that have at most one value.
/// When searching for it in [`Seen`], it will have a single string `value`
/// ```no_run
/// use supplement::{Seen, id};
/// let seen = Seen::new();
/// let id = id::SingleVal::new(0);
/// let v: &str = &seen.find(id).unwrap().value;
/// ```
;
/// Id for things that can have more than one value.
/// When searching for it in [`Seen`], it will have a vector of string `values`
/// ```no_run
/// use supplement::{Seen, id};
/// let seen = Seen::new();
/// let id = id::MultiVal::new(0);
/// let v: &[String] = &seen.find(id).unwrap().values;
/// ```
;