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