pub struct Input { /* private fields */ }
Expand description
A dialog box with a text input field.
This dialog box displays a text and an input field. It returns the text entered by the user or
None
if the user cancelled the dialog.
Example
use dialog::DialogBox;
let name = dialog::Input::new("Please enter your name")
.title("Name")
.show()
.expect("Could not display dialog box");
match name {
Some(name) => println!("Hello {}!", name),
None => println!("Hello stranger!"),
};
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnwindSafe for Input
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