Struct requestty_ui::widgets::StringInput [−][src]
pub struct StringInput<F = FilterMapChar> { /* fields omitted */ }Expand description
A widget that inputs a string.
A filter_map function can optionally be provided to limit and change the characters allowed,
similar to Iterator::filter_map.
If only a single character is required, use CharInput.
Implementations
Creates a new StringInput which accepts all characters.
Creates a new StringInput which only accepts characters as per the filter_map function.
A mask to render instead of the actual characters.
This is useful for passwords.
Hide the value being entered, and render nothing.
This is useful for passwords.
A helper that sets mask if mask is some, otherwise hides the output
Replaces the value with the result of the function
Check whether any character has come to the input.
This does not check if the string is empty. So a character is added, and then deleted, it
has_value will return true.
Trait Implementations
This widget ignores layout.offset_x and wraps around in the terminal.
Handle a key input. It should return whether key was handled.
The number of rows of the terminal the widget will take when rendered. Read more
Auto Trait Implementations
impl<F> RefUnwindSafe for StringInput<F> where
F: RefUnwindSafe,
impl<F> Send for StringInput<F> where
F: Send,
impl<F> Sync for StringInput<F> where
F: Sync,
impl<F> Unpin for StringInput<F> where
F: Unpin,
impl<F> UnwindSafe for StringInput<F> where
F: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more