@@ -17,37 +17,41 @@ pub(crate) enum PromptReasonKind {
17
17
#[ derive( Clone , Debug , Parser ) ]
18
18
#[ command( author, version, about, long_about = None ) ]
19
19
pub ( crate ) struct Arguments {
20
- #[ arg( short, long, value_name = "N" , help = "Your temperature in Celsius" ) ]
20
+ /// Your temperature in Celsius
21
+ #[ arg( short, long, value_name = "N" ) ]
21
22
pub ( crate ) temperature : Option < f64 > ,
22
23
24
+ /// Your health status
25
+ ///
26
+ /// CUSTOM will replace any health messages including '健康' and '不良'.
23
27
#[ arg(
24
28
short = 'e' ,
25
29
long,
26
30
value_name = "healthy|unhealthy|CUSTOM" ,
27
- help = "Your health status"
28
31
) ]
29
32
pub ( crate ) health : Option < Health > ,
30
33
31
- #[ arg( short, long, value_name = "TEXT" , help = "Additional information to provide" ) ]
34
+ /// Additional information to provide
35
+ ///
36
+ /// This will be added at last of generated text with newline.
37
+ #[ arg( short, long, value_name = "TEXT" ) ]
32
38
pub ( crate ) additional : Option < String > ,
33
39
34
- #[ arg( short, long, help = "Generate your health status without prompting" ) ]
40
+ /// Generae your health status without prompting
41
+ ///
42
+ /// The generated health text will be:
43
+ /// temperature: [Generated randomly]
44
+ /// health: [Health::Healthy]
45
+ /// additional: [None]
46
+ #[ arg( short, long, verbatim_doc_comment) ]
35
47
oneshot : bool ,
36
48
37
- #[ arg(
38
- long,
39
- value_name = "N" ,
40
- default_value_t = DEFAULT_RANGE_MIN ,
41
- help = "Minimum random temperature range in Celsius"
42
- ) ]
49
+ /// Minimum random temperature range in Celsius
50
+ #[ arg( long, value_name = "N" , default_value_t = DEFAULT_RANGE_MIN ) ]
43
51
pub ( crate ) range_min : f64 ,
44
52
45
- #[ arg(
46
- long,
47
- value_name = "N" ,
48
- default_value_t = DEFAULT_RANGE_MAX ,
49
- help = "Maximum random temperature range in Celsius"
50
- ) ]
53
+ /// Maximum (included) random temperature range in Celsius
54
+ #[ arg( long, value_name = "N" , default_value_t = DEFAULT_RANGE_MAX ) ]
51
55
pub ( crate ) range_max : f64 ,
52
56
}
53
57
0 commit comments