pub struct MultilinePrompt { /* private fields */ }Expand description
Builder returned by multiline().
Implementations§
Source§impl MultilinePrompt
impl MultilinePrompt
Sourcepub fn placeholder(self, v: impl Into<String>) -> Self
pub fn placeholder(self, v: impl Into<String>) -> Self
Dim text shown in the input area before the user types.
Sourcepub fn show_submit(self, v: bool) -> Self
pub fn show_submit(self, v: bool) -> Self
Show a [ submit ] button focused with Tab (default: false,
which means double-Enter submits).
Sourcepub fn validate_with(self, v: Validator) -> Self
👎Deprecated since 0.1.0: use .rule(...) instead
pub fn validate_with(self, v: Validator) -> Self
use .rule(...) instead
Deprecated alias for rule.
Trait Implementations§
Source§impl Prompt for MultilinePrompt
impl Prompt for MultilinePrompt
Source§fn handle(&mut self, key: Key) -> Step<String>
fn handle(&mut self, key: Key) -> Step<String>
Apply a key press to the prompt’s internal state. Return: Read more
Source§fn render(&self, _ctx: RenderCtx<'_>) -> Frame
fn render(&self, _ctx: RenderCtx<'_>) -> Frame
Render the prompt’s current state as one frame (a
Vec<String>,
one entry per terminal row). The runner takes care of writing the
frame and clearing it on the next iteration — prompts never call
eprintln! themselves.Source§fn render_answered(&self, value: &String) -> Frame
fn render_answered(&self, value: &String) -> Frame
Render the prompt’s post-submission display. Typically the
◇ question / │ value / │ triple from theme::answered.Source§fn run_fallback(self) -> Result<String>
fn run_fallback(self) -> Result<String>
Optional non-interactive fallback for piped/CI environments. The
default is to refuse — most prompts override this with a numeric
or line-buffered alternative.
Auto Trait Implementations§
impl !RefUnwindSafe for MultilinePrompt
impl !UnwindSafe for MultilinePrompt
impl Freeze for MultilinePrompt
impl Send for MultilinePrompt
impl Sync for MultilinePrompt
impl Unpin for MultilinePrompt
impl UnsafeUnpin for MultilinePrompt
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