pub struct Task {
pub id: TaskId,
pub description: String,
pub priority: TaskPriority,
pub status: TaskStatus,
pub required_skills: HashSet<SkillTag>,
pub estimated_cost: f32,
pub dependencies: Vec<TaskId>,
pub assignee: Option<MemberId>,
pub created_at: u64,
pub deadline: Option<u64>,
}Expand description
A task in the task pool
Fields§
§id: TaskIdUnique identifier
description: StringHuman-readable description
priority: TaskPriorityPriority level
status: TaskStatusCurrent status
required_skills: HashSet<SkillTag>Required skills
estimated_cost: f32Estimated cost/effort
dependencies: Vec<TaskId>Task dependencies (must be completed first)
assignee: Option<MemberId>Currently assigned member (if any)
created_at: u64When task was created
deadline: Option<u64>Deadline (if any)
Implementations§
Source§impl Task
impl Task
pub fn new(id: impl Into<String>, description: impl Into<String>) -> Self
pub fn with_priority(self, priority: TaskPriority) -> Self
pub fn with_skills(self, skills: Vec<SkillTag>) -> Self
pub fn with_cost(self, cost: f32) -> Self
pub fn with_dependencies(self, deps: Vec<TaskId>) -> Self
pub fn with_deadline(self, deadline: u64) -> Self
Sourcepub fn is_ready(&self) -> bool
pub fn is_ready(&self) -> bool
Check if task is ready to be worked on (no blocking dependencies)
Sourcepub fn is_blocked(&self) -> bool
pub fn is_blocked(&self) -> bool
Check if task is blocked
Sourcepub fn is_completed(&self) -> bool
pub fn is_completed(&self) -> bool
Check if task is completed
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Task
impl<'de> Deserialize<'de> for Task
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Task
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Component for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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