Trait tui_prompts::Prompt

source ·
pub trait Prompt: StatefulWidget {
    // Required method
    fn draw(self, frame: &mut Frame<'_>, area: Rect, state: &mut Self::State);
}
Expand description

A prompt that can be drawn to a terminal.

Required Methods§

source

fn draw(self, frame: &mut Frame<'_>, area: Rect, state: &mut Self::State)

Draws the prompt widget.

This is in addition to the StatefulWidget trait implementation as we need the Frame to set the cursor position.

Implementors§