InputSettingKind

Trait InputSettingKind 

Source
pub trait InputSettingKind: SettingKind {
    // Required methods
    fn submit_view_id(&self) -> ViewId;
    fn open_entry_id(&self) -> EntryId;
    fn input_label(&self) -> String;
    fn input_max_chars(&self) -> usize;
    fn current_text(&self, settings: &Settings) -> String;
    fn apply_text(&self, text: &str, settings: &mut Settings) -> String;
}
Expand description

Extended trait for settings that accept free-form text input via a NamedInput overlay.

Required Methods§

Source

fn submit_view_id(&self) -> ViewId

The ViewId used by this setting’s NamedInput and its submit event.

Source

fn open_entry_id(&self) -> EntryId

The EntryId event that opens this setting’s input dialog when tapped.

Source

fn input_label(&self) -> String

Label shown inside the NamedInput dialog.

Source

fn input_max_chars(&self) -> usize

Maximum number of characters the input accepts.

Source

fn current_text(&self, settings: &Settings) -> String

The current value as a string to pre-populate the input field.

Source

fn apply_text(&self, text: &str, settings: &mut Settings) -> String

Parse text from the input, mutate settings, and return the display string.

Implementors§