Struct tty_form::step::KeyValueStep
source · pub struct KeyValueStep { /* private fields */ }Expand description
A key-value-pair set entry step.
Implementations
sourceimpl KeyValueStep
impl KeyValueStep
pub fn new(prompt: &str) -> Self
pub fn set_evaluation(&mut self, evaluation: Evaluation) -> DependencyId
Trait Implementations
sourceimpl Step for KeyValueStep
impl Step for KeyValueStep
sourcefn initialize(&mut self, _dependency_state: &mut DependencyState, _index: usize)
fn initialize(&mut self, _dependency_state: &mut DependencyState, _index: usize)
Perform any post-configuration initialization actions for this step.
sourcefn render(
&self,
interface: &mut Interface<'_>,
_dependency_state: &DependencyState,
position: Position,
is_focused: bool
) -> u16
fn render(
&self,
interface: &mut Interface<'_>,
_dependency_state: &DependencyState,
position: Position,
is_focused: bool
) -> u16
Render this step at the specified position and return the height of the rendered content.
sourcefn update(
&mut self,
_dependency_state: &mut DependencyState,
input: KeyEvent
) -> Option<InputResult>
fn update(
&mut self,
_dependency_state: &mut DependencyState,
input: KeyEvent
) -> Option<InputResult>
Handle the specified input event, optionally returning an instruction for the form.
sourcefn drawer(&self) -> Option<DrawerContents>
fn drawer(&self) -> Option<DrawerContents>
Retrieve this step’s current drawer contents, if applicable.
sourcefn result(&self, _dependency_state: &DependencyState) -> String
fn result(&self, _dependency_state: &DependencyState) -> String
Retrieves this step’s final WYSIWYG result.
Auto Trait Implementations
impl RefUnwindSafe for KeyValueStep
impl Send for KeyValueStep
impl Sync for KeyValueStep
impl Unpin for KeyValueStep
impl UnwindSafe for KeyValueStep
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more