pub struct TaskProgressView { /* private fields */ }Expand description
A full-screen view for multi-step task execution with progress display.
Implementations§
Source§impl TaskProgressView
impl TaskProgressView
Sourcepub fn builder(steps: Vec<TaskStep>) -> TaskProgressViewBuilder
pub fn builder(steps: Vec<TaskStep>) -> TaskProgressViewBuilder
Create a builder for a new TaskProgressView with the given steps.
Use the builder pattern for configuration:
ⓘ
TaskProgressView::builder(steps)
.title("My App")
.auto_start()
.build()Sourcepub fn with_context<C: Any + Send + Sync>(
steps: Vec<TaskStep>,
context: C,
) -> TaskProgressViewBuilder
pub fn with_context<C: Any + Send + Sync>( steps: Vec<TaskStep>, context: C, ) -> TaskProgressViewBuilder
Create a new TaskProgressView with steps and a context.
The context is used by the confirmation modal’s content_fn.
Sourcepub fn should_quit(&self) -> bool
pub fn should_quit(&self) -> bool
Check if the view should quit.
Sourcepub fn was_cancelled(&self) -> bool
pub fn was_cancelled(&self) -> bool
Check if the operation was cancelled by user.
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Check if completed successfully.
Sourcepub fn has_failure(&self) -> bool
pub fn has_failure(&self) -> bool
Check if there was a failure.
Sourcepub fn start_task(&mut self, index: usize)
pub fn start_task(&mut self, index: usize)
Start a task by index (for external control mode).
Sourcepub fn complete_task(&mut self, index: usize, result: StepResult)
pub fn complete_task(&mut self, index: usize, result: StepResult)
Complete a task with result (for external control mode).
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if a task is currently running.
Sourcepub fn is_all_complete(&self) -> bool
pub fn is_all_complete(&self) -> bool
Check if all tasks are complete.
Sourcepub fn current_task_index(&self) -> Option<usize>
pub fn current_task_index(&self) -> Option<usize>
Get current task index.
Trait Implementations§
Source§impl Model for TaskProgressView
impl Model for TaskProgressView
Source§type Message = TaskProgressMsg
type Message = TaskProgressMsg
The message type for this model. Read more
Source§fn init(&self) -> Option<Cmd<Self::Message>>
fn init(&self) -> Option<Cmd<Self::Message>>
Initialize the model, returning an optional startup command. Read more
Source§fn update(&mut self, msg: Self::Message) -> Option<Cmd<Self::Message>>
fn update(&mut self, msg: Self::Message) -> Option<Cmd<Self::Message>>
Handle a message and update the model state. Read more
Source§fn handle_event(&self, event: Event) -> Option<Self::Message>
fn handle_event(&self, event: Event) -> Option<Self::Message>
Convert terminal events to messages. Read more
Source§fn subscriptions(&self) -> Sub<Self::Message>
fn subscriptions(&self) -> Sub<Self::Message>
Declare subscriptions for recurring events. Read more
Source§fn wants_tick(&self) -> bool
fn wants_tick(&self) -> bool
Whether this model should receive tick updates. Read more
Auto Trait Implementations§
impl Freeze for TaskProgressView
impl !RefUnwindSafe for TaskProgressView
impl Send for TaskProgressView
impl !Sync for TaskProgressView
impl Unpin for TaskProgressView
impl !UnwindSafe for TaskProgressView
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