pub struct Task {Show 18 fields
pub id: TaskId,
pub name: String,
pub task_type: String,
pub priority: i32,
pub payload: Vec<u8>,
pub dependencies: Vec<TaskId>,
pub estimated_duration: Option<Duration>,
pub resources: ResourceRequirements,
pub locality_hints: Vec<String>,
pub created_at: Instant,
pub scheduled_at: Option<Instant>,
pub started_at: Option<Instant>,
pub completed_at: Option<Instant>,
pub status: TaskStatus,
pub result: Option<TaskResult>,
pub error: Option<String>,
pub retry_count: u32,
pub checkpoint: Option<Vec<u8>>,
}Expand description
A task in the task graph.
Fields§
§id: TaskIdUnique task ID
name: StringTask name
task_type: StringTask type
priority: i32Task priority (higher = more important)
payload: Vec<u8>Task payload (serialized data)
dependencies: Vec<TaskId>Dependencies (tasks that must complete before this one)
estimated_duration: Option<Duration>Estimated execution time
resources: ResourceRequirementsResource requirements
locality_hints: Vec<String>Data locality hints (preferred worker IDs)
created_at: InstantCreation timestamp
scheduled_at: Option<Instant>Scheduled timestamp
started_at: Option<Instant>Started timestamp
completed_at: Option<Instant>Completed timestamp
status: TaskStatusTask status
result: Option<TaskResult>Result (if completed)
error: Option<String>Error (if failed)
retry_count: u32Number of retry attempts
checkpoint: Option<Vec<u8>>Checkpoint data
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Task
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnsafeUnpin for Task
impl UnwindSafe for Task
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