pub struct PathPrompt { /* private fields */ }Expand description
Builder returned by path().
Implementations§
Trait Implementations§
Source§impl Prompt for PathPrompt
impl Prompt for PathPrompt
Source§fn handle(&mut self, key: Key) -> Step<PathBuf>
fn handle(&mut self, key: Key) -> Step<PathBuf>
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: &PathBuf) -> Frame
fn render_answered(&self, value: &PathBuf) -> Frame
Render the prompt’s post-submission display. Typically the
◇ question / │ value / │ triple from theme::answered.Source§fn run_fallback(self) -> Result<PathBuf>
fn run_fallback(self) -> Result<PathBuf>
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 Freeze for PathPrompt
impl RefUnwindSafe for PathPrompt
impl Send for PathPrompt
impl Sync for PathPrompt
impl Unpin for PathPrompt
impl UnsafeUnpin for PathPrompt
impl UnwindSafe for PathPrompt
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