pub struct PhaseBuilder { /* private fields */ }Expand description
Builder for one nonempty first-class phase.
Implementations§
Source§impl PhaseBuilder
impl PhaseBuilder
Sourcepub fn progress_workload<W>(
self,
configuration: TaskConfig,
kind: impl Into<String>,
workload: W,
) -> Self
pub fn progress_workload<W>( self, configuration: TaskConfig, kind: impl Into<String>, workload: W, ) -> Self
Adds one iterative workload backed by an already selected configuration.
Sourcepub fn activity_workload<W>(
self,
configuration: TaskConfig,
kind: impl Into<String>,
workload: W,
) -> Self
pub fn activity_workload<W>( self, configuration: TaskConfig, kind: impl Into<String>, workload: W, ) -> Self
Adds one activity workload backed by an already selected configuration.
Sourcepub fn reused_activity(
self,
configuration: TaskConfig,
kind: impl Into<String>,
) -> Self
pub fn reused_activity( self, configuration: TaskConfig, kind: impl Into<String>, ) -> Self
Adds one application-verified reused activity task.
Sourcepub fn progress_tasks_from_project<W>(
self,
project: &ScientificProject,
kind: impl Into<String>,
workload: W,
) -> Self
pub fn progress_tasks_from_project<W>( self, project: &ScientificProject, kind: impl Into<String>, workload: W, ) -> Self
Generates iterative tasks that share one thread-safe workload.
Use this concise form when the callable can borrow shared captured
state. Use Self::progress_workloads_from_project when each task must
instead own a separately constructed resource.
Sourcepub fn progress_tasks_from_configuration<W>(
self,
configuration: &ProjectConfig,
kind: impl Into<String>,
workload: W,
) -> Self
pub fn progress_tasks_from_configuration<W>( self, configuration: &ProjectConfig, kind: impl Into<String>, workload: W, ) -> Self
Generates iterative tasks from configuration with one shared workload.
Sourcepub fn progress_workloads_from_project<F, W>(
self,
project: &ScientificProject,
kind: impl Into<String>,
factory: F,
) -> Self
pub fn progress_workloads_from_project<F, W>( self, project: &ScientificProject, kind: impl Into<String>, factory: F, ) -> Self
Generates executable iterative tasks from every project configuration.
Sourcepub fn progress_workloads_from_configuration<F, W>(
self,
configuration: &ProjectConfig,
kind: impl Into<String>,
factory: F,
) -> Self
pub fn progress_workloads_from_configuration<F, W>( self, configuration: &ProjectConfig, kind: impl Into<String>, factory: F, ) -> Self
Generates executable iterative tasks from lower-level configuration.
Sourcepub fn activity_tasks_from_project<W>(
self,
project: &ScientificProject,
kind: impl Into<String>,
workload: W,
) -> Self
pub fn activity_tasks_from_project<W>( self, project: &ScientificProject, kind: impl Into<String>, workload: W, ) -> Self
Generates activity tasks that share one thread-safe workload.
Use Self::activity_workloads_from_project when each task needs a
separately constructed single-owner resource.
Sourcepub fn activity_tasks_from_configuration<W>(
self,
configuration: &ProjectConfig,
kind: impl Into<String>,
workload: W,
) -> Self
pub fn activity_tasks_from_configuration<W>( self, configuration: &ProjectConfig, kind: impl Into<String>, workload: W, ) -> Self
Generates activity tasks from configuration with one shared workload.
Sourcepub fn activity_workloads_from_project<F, W>(
self,
project: &ScientificProject,
kind: impl Into<String>,
factory: F,
) -> Self
pub fn activity_workloads_from_project<F, W>( self, project: &ScientificProject, kind: impl Into<String>, factory: F, ) -> Self
Generates executable activity tasks from every project configuration.
Sourcepub fn activity_workloads_from_configuration<F, W>(
self,
configuration: &ProjectConfig,
kind: impl Into<String>,
factory: F,
) -> Self
pub fn activity_workloads_from_configuration<F, W>( self, configuration: &ProjectConfig, kind: impl Into<String>, factory: F, ) -> Self
Generates executable activity tasks from lower-level configuration.
Sourcepub fn display_tasks_by<I, S>(self, kind: impl Into<String>, keys: I) -> Self
pub fn display_tasks_by<I, S>(self, kind: impl Into<String>, keys: I) -> Self
Selects the exact parameter subset used to label one task kind.
Sourcepub fn max_active_tasks(self, maximum: usize) -> Self
pub fn max_active_tasks(self, maximum: usize) -> Self
Sets the later scheduler’s phase-local active workload ceiling.
Sourcepub fn prepared_task_queue_capacity(self, capacity: usize) -> Self
pub fn prepared_task_queue_capacity(self, capacity: usize) -> Self
Sets the later scheduler’s prepared-work queue capacity.
Sourcepub fn delay_per_task(self, delay: Duration) -> Self
pub fn delay_per_task(self, delay: Duration) -> Self
Sets a minimum start-to-start interval for executable tasks.
This policy is optional. Without this call, tasks are admitted exactly as before. Reused tasks do not consume a delay rank.
Sourcepub fn task_timeout(self, timeout: Duration) -> Self
pub fn task_timeout(self, timeout: Duration) -> Self
Sets the maximum elapsed time for each task after it starts.
Expiration requests cooperative cancellation; Rust workloads cannot be forcibly terminated while they are blocked in user or system code.
Sourcepub fn deadline_after(self, deadline: Duration) -> Self
pub fn deadline_after(self, deadline: Duration) -> Self
Sets a phase-wide deadline relative to the phase execution start.
Once reached, no additional tasks start and active tasks receive a cooperative cancellation request.
Sourcepub fn depends_on(self, dependency: impl Into<PhaseId>) -> Self
pub fn depends_on(self, dependency: impl Into<PhaseId>) -> Self
Declares one phase that must be satisfied before this phase starts.
Sourcepub fn failure_policy(self, policy: PhaseFailurePolicy) -> Self
pub fn failure_policy(self, policy: PhaseFailurePolicy) -> Self
Selects behavior after the first workload failure.
Sourcepub fn require_confirm(self, require: bool) -> Self
pub fn require_confirm(self, require: bool) -> Self
Requires the user to type yes before advancing to the next phase.
The default is false. This setting has no effect when this phase is
the final selected phase because there is no transition to confirm.
Sourcepub fn build(self) -> Result<Phase, ReportingError>
pub fn build(self) -> Result<Phase, ReportingError>
Validates and creates one immutable nonempty phase.