pub struct Dialog { /* private fields */ }
Expand description
The dialog
backend.
This backend uses the external dialog
program (not to be confused with this crate also called
dialog
) to display text-based dialog boxes in the terminal.
Implementations
sourceimpl Dialog
impl Dialog
sourcepub fn set_backtitle(&mut self, backtitle: impl Into<String>)
pub fn set_backtitle(&mut self, backtitle: impl Into<String>)
Sets the backtitle for the dialog boxes.
The backtitle is displayed on the backdrop, at the top of the screen.
sourcepub fn set_height(&mut self, height: u32)
pub fn set_height(&mut self, height: u32)
Sets the height of the dialog boxes.
The height is given in characters. The actual height of the dialog box might be higher than the given height if the content would not fit otherwise. The default height is zero.
Trait Implementations
sourceimpl Backend for Dialog
impl Backend for Dialog
sourcefn show_input(&self, input: &Input) -> Result<Option<String>>
fn show_input(&self, input: &Input) -> Result<Option<String>>
Shows the given input dialog and returns the input.
sourcefn show_message(&self, message: &Message) -> Result<()>
fn show_message(&self, message: &Message) -> Result<()>
Shows the given message dialog.
sourcefn show_password(&self, password: &Password) -> Result<Option<String>>
fn show_password(&self, password: &Password) -> Result<Option<String>>
Shows the given password dialog and returns the password.
sourcefn show_question(&self, question: &Question) -> Result<Choice>
fn show_question(&self, question: &Question) -> Result<Choice>
Shows the given question dialog and returns the choice.
Auto Trait Implementations
impl RefUnwindSafe for Dialog
impl Send for Dialog
impl Sync for Dialog
impl Unpin for Dialog
impl UnwindSafe for Dialog
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