pub enum WizardEvent {
None,
StepCompleted {
index: usize,
value: String,
},
Done(Vec<String>),
Cancelled,
ArrayItemAdded {
array_step_idx: usize,
item_idx: usize,
},
ArrayItemDeleted {
array_step_idx: usize,
item_idx: usize,
},
ArrayItemCompleted {
array_step_idx: usize,
item_idx: usize,
values: Vec<String>,
},
}Expand description
Event returned by WizardState::handle_key.
StepCompleted doubles as the “field blurred / onChange” hook: validate
the value here and show an error toast if needed.
Variants§
None
StepCompleted
A non-array leaf step was confirmed (also the validate / onChange hook).
Done(Vec<String>)
All input_count steps have been confirmed.
Cancelled
The user cancelled (Esc at any top-level position).
ArrayItemAdded
An item was added to an array step (editing session started).
ArrayItemDeleted
An item was deleted from an array step.
ArrayItemCompleted
An item’s edit session was confirmed with all sub-step values.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WizardEvent
impl RefUnwindSafe for WizardEvent
impl Send for WizardEvent
impl Sync for WizardEvent
impl Unpin for WizardEvent
impl UnsafeUnpin for WizardEvent
impl UnwindSafe for WizardEvent
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> 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