File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,15 @@ use console::{Key, Term};
20
20
/// # Ok(()) } fn main() { test().unwrap(); }
21
21
/// ```
22
22
pub struct Confirm < ' a > {
23
+ /// Message of the confirmation prompt.
23
24
prompt : String ,
25
+ /// Whether to report the user's choice after selection.
24
26
report : bool ,
27
+ /// default option for the prompt (if any)
25
28
default : Option < bool > ,
29
+ /// if true, show the default value to the user, see [`show_default`](#method::show_default)
26
30
show_default : bool ,
31
+ /// when to react to user input, see [`wait_for_newline`](#methhod::wait_for_newline)
27
32
wait_for_newline : bool ,
28
33
theme : & ' a dyn Theme ,
29
34
}
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ pub trait Theme {
18
18
}
19
19
20
20
/// Format a confirmation prompt.
21
+ ///
22
+ /// `prompt` is the message of the confirmation prompt,
23
+ /// `default` is the default choice for the prompt (if any).
21
24
fn format_confirm_prompt (
22
25
& self ,
23
26
f : & mut dyn fmt:: Write ,
You can’t perform that action at this time.
0 commit comments