pub enum AskDirective {
Ask {
prompt: String,
default: Option<String>,
},
AskPassword {
prompt: String,
default: Option<String>,
},
AskLong {
prompt: String,
default: Option<String>,
},
AskFile {
prompt: String,
default: Option<String>,
},
Select {
prompt: String,
options: Vec<String>,
},
Choose {
prompt: String,
options: Vec<String>,
},
ChooseFile {
prompt: String,
},
Note(String),
Unknown {
directive: String,
rest: String,
},
}Expand description
One line of an +ASK block: a question to put to the user.
The client presents these in the order they appear and sends the answers back in the same order.
Variants§
Ask
Ask: a single-line answer, with an optional default.
AskPassword
AskP: the same, but the answer is masked as it is typed.
AskLong
AskL: a multi-line answer.
AskFile
AskF: a local filename to store something under.
Select
Select: several options, any number of which may be chosen.
Choose
Choose: several options, exactly one of which may be chosen.
ChooseFile
ChooseF: pick an existing local file.
Note(String)
Note: text to show, which asks nothing.
Unknown
A directive this crate does not model, kept verbatim so a client can show it rather than silently dropping a question.
Trait Implementations§
Source§impl Clone for AskDirective
impl Clone for AskDirective
Source§fn clone(&self) -> AskDirective
fn clone(&self) -> AskDirective
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AskDirective
impl Debug for AskDirective
impl Eq for AskDirective
Source§impl PartialEq for AskDirective
impl PartialEq for AskDirective
impl StructuralPartialEq for AskDirective
Auto Trait Implementations§
impl Freeze for AskDirective
impl RefUnwindSafe for AskDirective
impl Send for AskDirective
impl Sync for AskDirective
impl Unpin for AskDirective
impl UnsafeUnpin for AskDirective
impl UnwindSafe for AskDirective
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more