pub struct AskUserRequest {
pub question: String,
pub options: Vec<String>,
pub default: Option<String>,
pub response_tx: Sender<String>,
}Expand description
A request sent from AskUserTool to the TUI for user input.
The tool creates a oneshot channel, sends this struct through an mpsc
channel, and then awaits the oneshot receiver. The TUI displays the
question, collects the user’s answer, and sends it back via response_tx.
Fields§
§question: StringThe question to display.
options: Vec<String>Optional list of choices.
default: Option<String>Default answer if the user cancels.
response_tx: Sender<String>Oneshot sender the TUI uses to return the user’s answer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AskUserRequest
impl !RefUnwindSafe for AskUserRequest
impl Send for AskUserRequest
impl Sync for AskUserRequest
impl Unpin for AskUserRequest
impl UnsafeUnpin for AskUserRequest
impl !UnwindSafe for AskUserRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more