[−][src]Struct dialoguer::OrderList
Renders a list to order.
Methods
impl<'a> OrderList<'a>
[src]
pub fn new() -> OrderList<'static>
[src]
Creates a new orderlist object.
pub fn with_theme(theme: &'a dyn Theme) -> OrderList<'a>
[src]
Sets a theme other than the default one.
pub fn paged(&mut self, val: bool) -> &mut OrderList<'a>
[src]
Enables or disables paging
pub fn clear(&mut self, val: bool) -> &mut OrderList<'a>
[src]
Sets the clear behavior of the checkbox menu.
The default is to clear the checkbox menu.
pub fn item(&mut self, item: &str) -> &mut OrderList<'a>
[src]
Add a single item to the selector.
pub fn items<T: ToString>(&mut self, items: &[T]) -> &mut OrderList<'a>
[src]
Adds multiple items to the selector.
pub fn with_prompt(&mut self, prompt: &str) -> &mut OrderList<'a>
[src]
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 order the items with the space bar and the arrows. On enter the ordered list 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
Auto Trait Implementations
impl<'a> !Send for OrderList<'a>
impl<'a> !Sync for OrderList<'a>
impl<'a> Unpin for OrderList<'a>
impl<'a> !UnwindSafe for OrderList<'a>
impl<'a> !RefUnwindSafe for OrderList<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,