pub struct Wizard {
pub config: WizardConfig,
pub step: WizardStep,
pub is_update: bool,
pub transcript: WizardTranscript,
/* private fields */
}Expand description
The wizard state machine.
Fields§
§config: WizardConfig§step: WizardStep§is_update: bool§transcript: WizardTranscriptImplementations§
Source§impl Wizard
impl Wizard
Sourcepub fn with_saved_config(
config: WizardConfig,
beads_path: Option<PathBuf>,
) -> Self
pub fn with_saved_config( config: WizardConfig, beads_path: Option<PathBuf>, ) -> Self
Create a wizard with a pre-loaded saved config.
Sourcepub fn beads_path(&self) -> Option<&Path>
pub fn beads_path(&self) -> Option<&Path>
Beads path, if provided.
Sourcepub fn advance(&mut self) -> Option<WizardStep>
pub fn advance(&mut self) -> Option<WizardStep>
Advance to the next step, returning None when done.
Sourcepub fn go_back(&mut self) -> Option<WizardStep>
pub fn go_back(&mut self) -> Option<WizardStep>
Go back one step.
Sourcepub fn can_cancel(&self) -> bool
pub fn can_cancel(&self) -> bool
Whether the current step can be cancelled.
Sourcepub fn apply_result(&mut self, result: StepResult) -> WizardTransition
pub fn apply_result(&mut self, result: StepResult) -> WizardTransition
Apply a step result to the wizard state.
Auto Trait Implementations§
impl Freeze for Wizard
impl RefUnwindSafe for Wizard
impl Send for Wizard
impl Sync for Wizard
impl Unpin for Wizard
impl UnsafeUnpin for Wizard
impl UnwindSafe for Wizard
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