Expand description
TUI input library supporting multiple backends.
Example: Without any backend
use tui_input::{Input, InputRequest, InputResponse};
let req = InputRequest::InsertChar('x');
let mut input = Input::default();
let resp = input.handle(req);
assert_eq!(resp, InputResponse::StateChanged { value: true, cursor: true });
assert_eq!(input.value(), "x");
assert_eq!(input.cursor(), 1);See other examples on GitHub repository.
Modules
Structs
The input buffer with cursor support.
Enums
Input requests are used to change the input state.
Input response is emitted to notify about state changes and other events.