Struct dialoguer::MultiSelect [−][src]
Renders a multi select prompt.
Implementations
impl<'a> MultiSelect<'a>
[src]
pub fn new() -> MultiSelect<'static>
[src]
Creates a multi select prompt.
pub fn with_theme(theme: &'a dyn Theme) -> MultiSelect<'a>
[src]
Creates a multi select prompt with a specific theme.
pub fn paged(&mut self, val: bool) -> &mut MultiSelect<'a>
[src]
Enables or disables paging
pub fn clear(&mut self, val: bool) -> &mut MultiSelect<'a>
[src]
Sets the clear behavior of the menu.
The default is to clear the menu.
pub fn defaults(&mut self, val: &[bool]) -> &mut MultiSelect<'a>
[src]
Sets a defaults for the menu.
pub fn item<T: ToString>(&mut self, item: T) -> &mut MultiSelect<'a>
[src]
Add a single item to the selector.
pub fn item_checked<T: ToString>(
&mut self,
item: T,
checked: bool
) -> &mut MultiSelect<'a>
[src]
&mut self,
item: T,
checked: bool
) -> &mut MultiSelect<'a>
Add a single item to the selector with a default checked state.
pub fn items<T: ToString>(&mut self, items: &[T]) -> &mut MultiSelect<'a>
[src]
Adds multiple items to the selector.
pub fn items_checked<T: ToString>(
&mut self,
items: &[(T, bool)]
) -> &mut MultiSelect<'a>
[src]
&mut self,
items: &[(T, bool)]
) -> &mut MultiSelect<'a>
Adds multiple items to the selector with checked state
pub fn with_prompt<S: Into<String>>(
&mut self,
prompt: S
) -> &mut MultiSelect<'a>
[src]
&mut self,
prompt: S
) -> &mut MultiSelect<'a>
Prefaces the menu with a prompt.
When a prompt is set the system also prints out a confirmation after the selection.
pub fn interact(&self) -> Result<Vec<usize>>
[src]
Enables user interaction and returns the result.
The user can select the items with the space bar and on enter the selected items will be returned.
pub fn interact_on(&self, term: &Term) -> Result<Vec<usize>>
[src]
Like interact
but allows a specific terminal to be set.
Trait Implementations
impl<'a> Default for MultiSelect<'a>
[src]
fn default() -> MultiSelect<'a>
[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for MultiSelect<'a>
impl<'a> !Send for MultiSelect<'a>
impl<'a> !Sync for MultiSelect<'a>
impl<'a> Unpin for MultiSelect<'a>
impl<'a> !UnwindSafe for MultiSelect<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,