Skip to main content

DialogInput

Type Alias DialogInput 

Source
pub type DialogInput<S> = DialogInput<ConfirmationContext<S>, InputContext<S>>;

Aliased Type§

pub enum DialogInput<S> {
    Confirmation {
        context: ConfirmationContext<S>,
        polling_delay_secs: Option<u32>,
    },
    Selection {
        options: Vec<DialogOption>,
        context: InputContext<S>,
    },
    Field {
        type_: InputType,
        secrecy_level: SecrecyLevel,
        min_length: Option<u32>,
        max_length: Option<u32>,
        context: InputContext<S>,
    },
}

Variants§

§

Confirmation

Just a primary action to confirm the dialog.

Fields

§context: ConfirmationContext<S>

Context object that can be used to confirm the dialog.

§polling_delay_secs: Option<u32>

If polling is acceptable, a delay in seconds is specified for which the client has to wait before automatically confirming.

§

Selection

A selection of options the user can choose from.

Fields

§options: Vec<DialogOption>

Options are meant to be rendered e.g. as radio buttons where the user must select exactly one to for a confirmation button to get enabled. Another example for an implementation is one button per option that immediately confirms the selection.

§context: InputContext<S>

Context object that can be used to respond to the dialog.

§

Field

An input field.

Fields

§type_: InputType

Type that may be used for showing hints or dedicated keyboard layouts and for applying input restrictions or validation.

§secrecy_level: SecrecyLevel

Indicates if the input should be masked.

§min_length: Option<u32>

Minimal length to allow.

§max_length: Option<u32>

Maximum length to allow.

§context: InputContext<S>

Context object that can be used to respond to the dialog.