pub struct WizardModalState {
pub title: String,
pub steps: Vec<WizardStepState>,
pub current_step: usize,
pub search: Option<ModalSearchState>,
pub mode: WizardModalMode,
}Expand description
State for a multi-step wizard modal with tabs for navigation
Fields§
§title: String§steps: Vec<WizardStepState>§current_step: usize§search: Option<ModalSearchState>§mode: WizardModalModeImplementations§
Source§impl WizardModalState
impl WizardModalState
Sourcepub fn new(
title: String,
steps: Vec<WizardStep>,
current_step: usize,
search: Option<InlineListSearchConfig>,
mode: WizardModalMode,
) -> Self
pub fn new( title: String, steps: Vec<WizardStep>, current_step: usize, search: Option<InlineListSearchConfig>, mode: WizardModalMode, ) -> Self
Create a new wizard modal state from wizard steps
Sourcepub fn handle_key_event(
&mut self,
key: &KeyEvent,
modifiers: ModalKeyModifiers,
) -> ModalListKeyResult
pub fn handle_key_event( &mut self, key: &KeyEvent, modifiers: ModalKeyModifiers, ) -> ModalListKeyResult
Handle key event for wizard navigation
pub fn unanswered_count(&self) -> usize
pub fn question_header(&self) -> String
pub fn notes_line(&self) -> Option<String>
pub fn notes_active(&self) -> bool
pub fn instruction_lines(&self) -> Vec<String>
Sourcepub fn all_steps_completed(&self) -> bool
pub fn all_steps_completed(&self) -> bool
Check if all steps are completed
Trait Implementations§
Source§impl Clone for WizardModalState
impl Clone for WizardModalState
Source§fn clone(&self) -> WizardModalState
fn clone(&self) -> WizardModalState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WizardModalState
impl RefUnwindSafe for WizardModalState
impl Send for WizardModalState
impl Sync for WizardModalState
impl Unpin for WizardModalState
impl UnsafeUnpin for WizardModalState
impl UnwindSafe for WizardModalState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more