pub struct ExecutionTask {
pub metadata: TaskMetadata,
pub requirements: TaskRequirements,
pub constraints: TaskConstraints,
pub execution_fn: Option<TaskExecutionFunction>,
pub status: TaskStatus,
pub context: Option<TaskContext>,
pub result: Option<TaskResult>,
}Expand description
Main execution task definition with comprehensive metadata and requirements
Fields§
§metadata: TaskMetadataTask metadata and identification
requirements: TaskRequirementsResource requirements for execution
constraints: TaskConstraintsExecution constraints and policies
execution_fn: Option<TaskExecutionFunction>Task execution function or closure
status: TaskStatusCurrent task status
context: Option<TaskContext>Task execution context
result: Option<TaskResult>Task execution results (when completed)
Implementations§
Source§impl ExecutionTask
impl ExecutionTask
Sourcepub fn builder() -> TaskBuilder
pub fn builder() -> TaskBuilder
Create a new task builder
Sourcepub fn new(
name: &str,
task_type: TaskType,
execution_fn: TaskExecutionFunction,
) -> Self
pub fn new( name: &str, task_type: TaskType, execution_fn: TaskExecutionFunction, ) -> Self
Create a simple task with basic parameters
Sourcepub fn status(&self) -> &TaskStatus
pub fn status(&self) -> &TaskStatus
Get task status
Sourcepub fn set_status(&mut self, status: TaskStatus)
pub fn set_status(&mut self, status: TaskStatus)
Update task status
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if task is complete
Trait Implementations§
Source§impl Clone for ExecutionTask
impl Clone for ExecutionTask
Source§fn clone(&self) -> ExecutionTask
fn clone(&self) -> ExecutionTask
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ExecutionTask
impl !RefUnwindSafe for ExecutionTask
impl Send for ExecutionTask
impl Sync for ExecutionTask
impl Unpin for ExecutionTask
impl !UnwindSafe for ExecutionTask
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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