Struct dialoguer::Checkboxes
source · pub struct Checkboxes<'a> { /* private fields */ }
Expand description
Renders a multi select checkbox menu.
Implementations
sourceimpl<'a> Checkboxes<'a>
impl<'a> Checkboxes<'a>
sourcepub fn new() -> Checkboxes<'static>
pub fn new() -> Checkboxes<'static>
Creates a new checkbox object.
sourcepub fn with_theme(theme: &'a dyn Theme) -> Checkboxes<'a>
pub fn with_theme(theme: &'a dyn Theme) -> Checkboxes<'a>
Sets a theme other than the default one.
sourcepub fn clear(&mut self, val: bool) -> &mut Checkboxes<'a>
pub fn clear(&mut self, val: bool) -> &mut Checkboxes<'a>
Sets the clear behavior of the checkbox menu.
The default is to clear the checkbox menu.
sourcepub fn item(&mut self, item: &str) -> &mut Checkboxes<'a>
pub fn item(&mut self, item: &str) -> &mut Checkboxes<'a>
Add a single item to the selector.
sourcepub fn items(&mut self, items: &[&str]) -> &mut Checkboxes<'a>
pub fn items(&mut self, items: &[&str]) -> &mut Checkboxes<'a>
Adds multiple items to the selector.
sourcepub fn with_prompt(&mut self, prompt: &str) -> &mut Checkboxes<'a>
pub fn with_prompt(&mut self, prompt: &str) -> &mut Checkboxes<'a>
Prefaces the menu with a prompt.
When a prompt is set the system also prints out a confirmation after the selection.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Checkboxes<'a>
impl<'a> !Send for Checkboxes<'a>
impl<'a> !Sync for Checkboxes<'a>
impl<'a> Unpin for Checkboxes<'a>
impl<'a> !UnwindSafe for Checkboxes<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more