[][src]Struct mg::DialogBuilder

pub struct DialogBuilder { /* fields omitted */ }

Builder to create a new dialog.


impl DialogBuilder[src]

pub fn new() -> Self[src]

Create a new dialog builder.

pub fn blocking(self, blocking: bool) -> Self[src]

Set whether the dialog will block or not.

pub fn choices(self, choices: Vec<char>) -> Self[src]

Set the choices available for the input.

pub fn completer(self, completer: &str) -> Self[src]

Set the text completer for the input.

pub fn default_answer(self, answer: String) -> Self[src]

Set the default answer for the input.

pub fn message(self, message: String) -> Self[src]

Set the message/question to show to the user.

pub fn responder(self, responder: Box<dyn Responder>) -> Self[src]

Set a responder for an asynchronous dialog.

pub fn shortcut(self, shortcut: Key, value: &str) -> Self[src]

Add a shortcut.

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Any for T where
    T: 'static + ?Sized