Struct requestty::PromptModule [−][src]
pub struct PromptModule<Q> { /* fields omitted */ }Expand description
A collection of questions and answers for previously answered questions.
Unlike prompt, this allows you to control how many questions you want to ask, and ask with
previous answers as well.
Implementations
Creates a new PromptModule with the given questions
Creates a PromptModule with the given questions and answers
Prompt a single question with the default Backend and EventIterator.
This may or may not actually prompt the question based on what when and ask_if_answered
returns for that particular question.
pub fn prompt_with<B, E>(
&mut self,
backend: &mut B,
events: &mut E
) -> Result<Option<&mut Answer>> where
B: Backend,
E: EventIterator,
pub fn prompt_with<B, E>(
&mut self,
backend: &mut B,
events: &mut E
) -> Result<Option<&mut Answer>> where
B: Backend,
E: EventIterator, Prompt a single question with the given Backend and EventIterator.
This may or may not actually prompt the question based on what when and ask_if_answered
returns for that particular question.
Prompt all remaining questions with the default Backend and EventIterator.
It consumes self and returns the answers to all the questions asked.
pub fn prompt_all_with<B, E>(
self,
backend: &mut B,
events: &mut E
) -> Result<Answers> where
B: Backend,
E: EventIterator,
pub fn prompt_all_with<B, E>(
self,
backend: &mut B,
events: &mut E
) -> Result<Answers> where
B: Backend,
E: EventIterator, Prompt all remaining questions with the given Backend and EventIterator.
It consumes self and returns the answers to all the questions asked.
Consumes self returning the answers to the previously asked questions.
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl<Q> RefUnwindSafe for PromptModule<Q> where
Q: RefUnwindSafe, impl<Q> Send for PromptModule<Q> where
Q: Send, impl<Q> Sync for PromptModule<Q> where
Q: Sync, impl<Q> Unpin for PromptModule<Q> where
Q: Unpin, impl<Q> UnwindSafe for PromptModule<Q> where
Q: UnwindSafe, Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V