Skip to main content

PhaseBuilder

Struct PhaseBuilder 

Source
pub struct PhaseBuilder { /* private fields */ }
Expand description

Builder for one nonempty first-class phase.

Implementations§

Source§

impl PhaseBuilder

Source

pub fn progress_workload<W>( self, configuration: TaskConfig, kind: impl Into<String>, workload: W, ) -> Self
where W: FnOnce(&TaskContext) -> TaskResult + Send + 'static,

Adds one iterative workload backed by an already selected configuration.

Source

pub fn activity_workload<W>( self, configuration: TaskConfig, kind: impl Into<String>, workload: W, ) -> Self
where W: FnOnce(&TaskContext) -> TaskResult + Send + 'static,

Adds one activity workload backed by an already selected configuration.

Source

pub fn reused_activity( self, configuration: TaskConfig, kind: impl Into<String>, ) -> Self

Adds one application-verified reused activity task.

Source

pub fn progress_tasks_from_project<W>( self, project: &ScientificProject, kind: impl Into<String>, workload: W, ) -> Self
where W: Fn(&TaskContext) -> TaskResult + Send + Sync + 'static,

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.

Source

pub fn progress_tasks_from_configuration<W>( self, configuration: &ProjectConfig, kind: impl Into<String>, workload: W, ) -> Self
where W: Fn(&TaskContext) -> TaskResult + Send + Sync + 'static,

Generates iterative tasks from configuration with one shared workload.

Source

pub fn progress_workloads_from_project<F, W>( self, project: &ScientificProject, kind: impl Into<String>, factory: F, ) -> Self
where F: Fn(&TaskConfig) -> W, W: FnOnce(&TaskContext) -> TaskResult + Send + 'static,

Generates executable iterative tasks from every project configuration.

Source

pub fn progress_workloads_from_configuration<F, W>( self, configuration: &ProjectConfig, kind: impl Into<String>, factory: F, ) -> Self
where F: Fn(&TaskConfig) -> W, W: FnOnce(&TaskContext) -> TaskResult + Send + 'static,

Generates executable iterative tasks from lower-level configuration.

Source

pub fn activity_tasks_from_project<W>( self, project: &ScientificProject, kind: impl Into<String>, workload: W, ) -> Self
where W: Fn(&TaskContext) -> TaskResult + Send + Sync + 'static,

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.

Source

pub fn activity_tasks_from_configuration<W>( self, configuration: &ProjectConfig, kind: impl Into<String>, workload: W, ) -> Self
where W: Fn(&TaskContext) -> TaskResult + Send + Sync + 'static,

Generates activity tasks from configuration with one shared workload.

Source

pub fn activity_workloads_from_project<F, W>( self, project: &ScientificProject, kind: impl Into<String>, factory: F, ) -> Self
where F: Fn(&TaskConfig) -> W, W: FnOnce(&TaskContext) -> TaskResult + Send + 'static,

Generates executable activity tasks from every project configuration.

Source

pub fn activity_workloads_from_configuration<F, W>( self, configuration: &ProjectConfig, kind: impl Into<String>, factory: F, ) -> Self
where F: Fn(&TaskConfig) -> W, W: FnOnce(&TaskContext) -> TaskResult + Send + 'static,

Generates executable activity tasks from lower-level configuration.

Source

pub fn display_tasks_by<I, S>(self, kind: impl Into<String>, keys: I) -> Self
where I: IntoIterator<Item = S>, S: Into<String>,

Selects the exact parameter subset used to label one task kind.

Source

pub fn max_concurrent_workloads(self, maximum: usize) -> Self

Sets the later scheduler’s phase-local active workload ceiling.

Source

pub fn queue_capacity(self, capacity: usize) -> Self

Sets the later scheduler’s prepared-work queue capacity.

Source

pub fn depends_on(self, dependency: impl Into<PhaseId>) -> Self

Declares one phase that must be satisfied before this phase starts.

Source

pub fn failure_policy(self, policy: PhaseFailurePolicy) -> Self

Selects behavior after the first workload failure.

Source

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.

Source

pub fn build(self) -> Result<Phase, ReportingError>

Validates and creates one immutable nonempty phase.

Trait Implementations§

Source§

impl Debug for PhaseBuilder

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.