Enum requestty::question::Choice [−][src]
pub enum Choice<T> {
Choice(T),
Separator(String),
DefaultSeparator,
}Expand description
A possible choice in a list.
Variants
The main variant which represents a choice the user can pick from.
Separator(String)A separator is a single line of text that can be used to annotate other choices. It is not selectable and is skipped over when users navigate.
If the text is more than one line, it will be cut-off.
Tuple Fields of Separator
0: StringA separator which prints a line: “──────────────”
Implementations
Maps an Choice<T> to Choice<U> by applying a function to the contained
Choice::Choice if any.
Returns true if the choice is a Choice::Choice.
Returns true if the choice is a separator.
Converts &Choice<T> to Choice<&T>.
This will clone the Choice::Separator if any.
Converts &mut Choice<T> to Choice<&mut T>.
This will clone the Choice::Separator if any.
Returns the contained Choice::Choice value, consuming self.
Panics
This will panic if self is not a Choice::Choice.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Choice<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Choice<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more